daemon: Implement ping command.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 10 Mar 2012 13:17:53 +0000 (13:17 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 10 Mar 2012 13:17:53 +0000 (13:17 +0000)
daemon/daemon.ml
lib/whenproto.x

index 5b9fc3b..cf14188 100644 (file)
@@ -82,6 +82,7 @@ let rec init j d =
       ~proc_set_variables
       ~proc_get_job_names
       ~proc_test_variables
       ~proc_set_variables
       ~proc_get_job_names
       ~proc_test_variables
+      ~proc_ping_daemon
       (Rpc_server.Unix addr)
       Rpc.Tcp (* not TCP, this is the same as SOCK_STREAM *)
       Rpc.Socket
       (Rpc_server.Unix addr)
       Rpc.Tcp (* not TCP, this is the same as SOCK_STREAM *)
       Rpc.Socket
@@ -256,6 +257,8 @@ and proc_test_variables vars =
   (* Return the names. *)
   Array.of_list jobnames
 
   (* Return the names. *)
   Array.of_list jobnames
 
+and proc_ping_daemon () = `ok
+
 (* Reload the jobs file. *)
 and reload_file () =
   let file = sprintf "%s/jobs.cmo" !jobsdir in
 (* Reload the jobs file. *)
 and reload_file () =
   let file = sprintf "%s/jobs.cmo" !jobsdir in
index 1d8980a..ff5edfb 100644 (file)
@@ -102,5 +102,6 @@ program When {
     status set_variables (set_variable_list) = 10;
     job_name_list get_job_names (void) = 11;
     job_name_list test_variables (set_variable_list) = 12;
     status set_variables (set_variable_list) = 10;
     job_name_list get_job_names (void) = 11;
     job_name_list test_variables (set_variable_list) = 12;
+    status ping_daemon (void) = 13;
   } = 1;
 } = 0x20008081;
   } = 1;
 } = 0x20008081;