]> andersk Git - moira.git/blobdiff - lib/mr_call.c
Code style cleanup. (No functional changes)
[moira.git] / lib / mr_call.c
index 9048dc8a4cecbfa20f741eadc98e2085f5fb3b75..57bf53daaf4c1f1eae84088aad1ecd1e952a606f 100644 (file)
@@ -15,34 +15,31 @@ static char *rcsid_sms_call_c = "$Header$";
 #include <mit-copyright.h>
 #include "mr_private.h"
 
-mr_do_call(params, reply)
-    struct mr_params *params;
-    struct mr_params **reply;
+int mr_do_call(struct mr_params *params, struct mr_params **reply)
 {
-    CHECK_CONNECTED;
-    
-    if (!_mr_send_op)
-       _mr_send_op = create_operation();
-
-    if (!_mr_recv_op)
-       _mr_recv_op = create_operation();
-
-    initialize_operation(_mr_send_op, mr_start_send, (char *)params,
-                        (int (*)())NULL);
-    queue_operation(_mr_conn, CON_OUTPUT, _mr_send_op);
-
-    initialize_operation(_mr_recv_op, mr_start_recv, (char *)reply,
-                        (int (*)())NULL);
-    queue_operation(_mr_conn, CON_INPUT, _mr_recv_op);
-
-    /* Block until operation done. */
-    mr_complete_operation(_mr_send_op);
-    mr_complete_operation(_mr_recv_op);
-    /* Look at results */
-    if ((OP_STATUS(_mr_send_op) != OP_COMPLETE) ||
-       (OP_STATUS(_mr_recv_op) != OP_COMPLETE)) {
-       mr_disconnect();
-       return MR_ABORTED;
+  CHECK_CONNECTED;
+
+  if (!_mr_send_op)
+    _mr_send_op = create_operation();
+
+  if (!_mr_recv_op)
+    _mr_recv_op = create_operation();
+
+  initialize_operation(_mr_send_op, mr_start_send, (char *)params, NULL);
+  queue_operation(_mr_conn, CON_OUTPUT, _mr_send_op);
+
+  initialize_operation(_mr_recv_op, mr_start_recv, (char *)reply, NULL);
+  queue_operation(_mr_conn, CON_INPUT, _mr_recv_op);
+
+  /* Block until operation done. */
+  mr_complete_operation(_mr_send_op);
+  mr_complete_operation(_mr_recv_op);
+  /* Look at results */
+  if ((OP_STATUS(_mr_send_op) != OP_COMPLETE) ||
+      (OP_STATUS(_mr_recv_op) != OP_COMPLETE))
+    {
+      mr_disconnect();
+      return MR_ABORTED;
     }
-    return 0;
+  return 0;
 }
This page took 0.163685 seconds and 4 git commands to generate.