]> andersk Git - moira.git/blob - update/inst_001.c
made the server to connect to an argument to sms_connect.
[moira.git] / update / inst_001.c
1 /*
2  *      $Source$
3  *      $Header$
4  */
5 /*  (c) Copyright 1988 by the Massachusetts Institute of Technology. */
6 /*  For copying and distribution information, please see the file */
7 /*  <mit-copyright.h>. */
8
9 #ifndef lint
10 static char *rcsid_inst_001_c = "$Header$";
11 #endif  lint
12
13 #include <mit-copyright.h>
14 #include <stdio.h>
15 #include <gdb.h>
16 #include "kludge.h"
17
18 STRING instructions = { 0, 0 };
19 extern CONNECTION conn;
20 extern int have_instructions;
21 extern int code;
22
23 /*
24  * instruction sequence transmission:
25  * syntax:
26  *      >>> (STRING) "inst_001"
27  *      <<< (int)0
28  *      >>> (STRING) instructions
29  *      <<< (int)0
30  */
31
32 inst_001(str)
33      char *str;
34 {
35      if (send_ok())
36           lose("sending okay for inst_001");
37      code = receive_object(conn, (char *)&instructions, STRING_T);
38      if (code) {
39           report_error("reporting failure to receive instructions");
40           return;
41      }
42      have_instructions = 1;
43      if (send_ok())
44           lose("sending okay after instructions");
45 #ifdef DEBUG
46      printf("got instructions: %s\n", STRING_DATA(instructions));
47 #endif
48 }
This page took 0.145705 seconds and 5 git commands to generate.