]> andersk Git - moira.git/blame - lib/mr_call.c
renamed rpc lib & handle NEED_STRCASECMP
[moira.git] / lib / mr_call.c
CommitLineData
ca401c43 1/*
2 * $Source$
3 * $Author$
4 * $Header$
5 *
6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
babbc197 7 * For copying and distribution information, please see the file
8 * <mit-copyright.h>.
ca401c43 9 */
10
11#ifndef lint
12static char *rcsid_sms_call_c = "$Header$";
13#endif lint
14
babbc197 15#include <mit-copyright.h>
8defc06b 16#include "mr_private.h"
ca401c43 17
8defc06b 18mr_do_call(params, reply)
19 struct mr_params *params;
20 struct mr_params **reply;
ca401c43 21{
83e80378 22 CHECK_CONNECTED;
23
8defc06b 24 if (!_mr_send_op)
25 _mr_send_op = create_operation();
83e80378 26
8defc06b 27 if (!_mr_recv_op)
28 _mr_recv_op = create_operation();
83e80378 29
8defc06b 30 initialize_operation(_mr_send_op, mr_start_send, (char *)params,
83e80378 31 (int (*)())NULL);
8defc06b 32 queue_operation(_mr_conn, CON_OUTPUT, _mr_send_op);
83e80378 33
8defc06b 34 initialize_operation(_mr_recv_op, mr_start_recv, (char *)reply,
83e80378 35 (int (*)())NULL);
8defc06b 36 queue_operation(_mr_conn, CON_INPUT, _mr_recv_op);
83e80378 37
38 /* Block until operation done. */
8defc06b 39 mr_complete_operation(_mr_send_op);
40 mr_complete_operation(_mr_recv_op);
83e80378 41 /* Look at results */
8defc06b 42 if ((OP_STATUS(_mr_send_op) != OP_COMPLETE) ||
43 (OP_STATUS(_mr_recv_op) != OP_COMPLETE)) {
44 mr_disconnect();
45 return MR_ABORTED;
83e80378 46 }
47 return 0;
ca401c43 48}
This page took 0.073085 seconds and 5 git commands to generate.