]>
Commit | Line | Data |
---|---|---|
ca401c43 | 1 | /* |
2 | * $Source$ | |
3 | * $Author$ | |
4 | * $Header$ | |
5 | * | |
6 | * Copyright (C) 1987 by the Massachusetts Institute of Technology | |
7 | * | |
8 | * $Log$ | |
83e80378 | 9 | * Revision 1.5 1987-06-16 17:47:50 wesommer |
10 | * Clean up memory allocation, indenting. | |
ca401c43 | 11 | * |
12 | */ | |
13 | ||
14 | #ifndef lint | |
15 | static char *rcsid_sms_call_c = "$Header$"; | |
16 | #endif lint | |
17 | ||
18 | #include "sms_private.h" | |
19 | ||
83e80378 | 20 | sms_do_call(params, reply) |
21 | struct sms_params *params; | |
22 | struct sms_params **reply; | |
ca401c43 | 23 | { |
83e80378 | 24 | CHECK_CONNECTED; |
25 | ||
26 | if (!_sms_send_op) | |
27 | _sms_send_op = create_operation(); | |
28 | ||
29 | if (!_sms_recv_op) | |
30 | _sms_recv_op = create_operation(); | |
31 | ||
32 | initialize_operation(_sms_send_op, sms_start_send, (char *)params, | |
33 | (int (*)())NULL); | |
34 | queue_operation(_sms_conn, CON_OUTPUT, _sms_send_op); | |
35 | ||
36 | initialize_operation(_sms_recv_op, sms_start_recv, (char *)reply, | |
37 | (int (*)())NULL); | |
38 | queue_operation(_sms_conn, CON_INPUT, _sms_recv_op); | |
39 | ||
40 | /* Block until operation done. */ | |
41 | complete_operation(_sms_send_op); | |
42 | complete_operation(_sms_recv_op); | |
43 | /* Look at results */ | |
44 | if ((OP_STATUS(_sms_send_op) != OP_COMPLETE) || | |
45 | (OP_STATUS(_sms_recv_op) != OP_COMPLETE)) { | |
46 | sms_disconnect(); | |
47 | return SMS_ABORTED; | |
48 | } | |
49 | return 0; | |
ca401c43 | 50 | } |
83e80378 | 51 | /* |
52 | * Local Variables: | |
53 | * mode: c | |
54 | * c-indent-level: 4 | |
55 | * c-continued-statement-offset: 4 | |
56 | * c-brace-offset: -4 | |
57 | * c-argdecl-indent: 4 | |
58 | * c-label-offset: -4 | |
59 | * End: | |
60 | */ |