]>
Commit | Line | Data |
---|---|---|
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 | |
12 | static char *rcsid_sms_call_c = "$Header$"; | |
13 | #endif lint | |
14 | ||
babbc197 | 15 | #include <mit-copyright.h> |
ca401c43 | 16 | #include "sms_private.h" |
17 | ||
83e80378 | 18 | sms_do_call(params, reply) |
19 | struct sms_params *params; | |
20 | struct sms_params **reply; | |
ca401c43 | 21 | { |
83e80378 | 22 | CHECK_CONNECTED; |
23 | ||
24 | if (!_sms_send_op) | |
25 | _sms_send_op = create_operation(); | |
26 | ||
27 | if (!_sms_recv_op) | |
28 | _sms_recv_op = create_operation(); | |
29 | ||
30 | initialize_operation(_sms_send_op, sms_start_send, (char *)params, | |
31 | (int (*)())NULL); | |
32 | queue_operation(_sms_conn, CON_OUTPUT, _sms_send_op); | |
33 | ||
34 | initialize_operation(_sms_recv_op, sms_start_recv, (char *)reply, | |
35 | (int (*)())NULL); | |
36 | queue_operation(_sms_conn, CON_INPUT, _sms_recv_op); | |
37 | ||
38 | /* Block until operation done. */ | |
39 | complete_operation(_sms_send_op); | |
40 | complete_operation(_sms_recv_op); | |
41 | /* Look at results */ | |
42 | if ((OP_STATUS(_sms_send_op) != OP_COMPLETE) || | |
43 | (OP_STATUS(_sms_recv_op) != OP_COMPLETE)) { | |
44 | sms_disconnect(); | |
45 | return SMS_ABORTED; | |
46 | } | |
47 | return 0; | |
ca401c43 | 48 | } |
83e80378 | 49 | /* |
50 | * Local Variables: | |
51 | * mode: c | |
52 | * c-indent-level: 4 | |
53 | * c-continued-statement-offset: 4 | |
54 | * c-brace-offset: -4 | |
55 | * c-argdecl-indent: 4 | |
56 | * c-label-offset: -4 | |
57 | * End: | |
58 | */ |