6 * Copyright (C) 1987 by the Massachusetts Institute of Technology
9 * Revision 1.2 1987-06-03 16:07:50 wesommer
12 * Revision 1.1 87/06/02 20:07:10 wesommer
18 static char *rcsid_sms_scall_c = "$Header$";
22 #include "sms_private.h"
23 #include "sms_server.h"
28 extern void clist_delete(), do_auth(), do_shutdown();
32 * Welcome to the (finite state) machine (highest level).
38 if (OP_STATUS(cp->pending_op) == OP_CANCELLED) {
39 (void) sprintf(buf1, "Closed connection (now %d client%s)",
42 com_err(whoami, 0, buf1);
49 /* Start recieving next request */
50 initialize_operation(cp->pending_op, sms_start_recv,
51 (char *)&cp->args, (int (*)())NULL);
52 queue_operation(cp->con, CON_INPUT, cp->pending_op);
53 cp->action = CL_RECEIVE;
56 /* Data is here. Process it & start it heading back */
57 do_call(cp); /* This may block for a while. */
58 initialize_operation(cp->pending_op, sms_start_send,
59 (char *)&cp->reply, (int (*)())NULL);
60 queue_operation(cp->con, CON_OUTPUT, cp->pending_op);
83 cl->reply.sms_argc = 0;
84 cl->reply.sms_status = 0;
85 if (((pn = cl->args->sms_procno) < 0) ||
86 (pn > SMS_MAX_PROC)) {
87 com_err(whoami, 0, "procno out of range");
88 cl->reply.sms_status = SMS_UNKNOWN_PROC;
92 fprintf(stderr, "[#%d] %s(", cl->id, procnames[pn]);
93 for (i=0; i < cl->args->sms_argc; i++) {
94 if (i) fputc(',', stderr);
95 frequote(stderr,cl->args->sms_argv[i]);
97 fprintf(stderr, ")\n");
102 cl->reply.sms_status = 0;
103 com_err(whoami, 0, "noop");