]> andersk Git - moira.git/blobdiff - update/update_server.c
Document new blanche exit status semantics. (Don't claim success
[moira.git] / update / update_server.c
index 54c162e1a866e8ff6b41238e7088b6fb50825321..a74fd87cd5063147603fd20fba3efe3843ea9213 100644 (file)
@@ -8,10 +8,11 @@
 
 #ifndef lint
 static char *rcsid_dispatch_c = "$Header$";
-#endif lint
+#endif
 
 #include <mit-copyright.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <gdb.h>
 #include <errno.h>
 #include <string.h>
@@ -24,27 +25,23 @@ static char *rcsid_dispatch_c = "$Header$";
 #include <termios.h>
 #endif
 #include "update.h"
+#include "des.h"
 
-extern int auth_001(), inst_001();
-extern int xfer_002(), xfer_003(), exec_002();
+extern int auth_002(), xfer_002(), xfer_003(), exec_002();
 
 extern int sync_proc(), quit();
 extern char *config_lookup();
 
 extern void gdb_debug();
-extern int abort(), errno;
-#ifndef sun
-extern int exit();
-#endif
-extern STRING instructions;
+extern int errno;
 
 CONNECTION conn;
-int code;
+int code, log_priority;
 char *whoami;
 
 int have_authorization = 0;
+C_Block session;
 int have_file = 0;
-int have_instructions = 0;
 int done = 0;
 int uid = 0;
 
@@ -56,13 +53,12 @@ struct _dt {
      char *str;
      int (*proc)();
 } dispatch_table[] = {
-     { "INST_001", inst_001 },
-     { "AUTH_001", auth_001 },
+     { "AUTH_002", auth_002 },
      { "XFER_002", xfer_002 },
      { "XFER_003", xfer_003 },
      { "EXEC_002", exec_002 },
      { "quit", quit },
-     { (char *)NULL, abort }
+     { (char *)NULL, (int (*)())abort }
 };
 
 /* general scratch space -- useful for building error messages et al... */
@@ -204,10 +200,7 @@ initialize()
 {
      /* keep have_authorization around */
      have_file = 0;
-     have_instructions = 0;
      done = 0;
-     if (STRING_DATA(instructions) != (char *)NULL)
-         string_free(&instructions);
 }
 
 
@@ -232,7 +225,7 @@ quit(str)
      (void) send_ok();
      sever_connection(conn);
      mr_log_info("Closing connection.");
-     return(exit(0));
+     exit(0);
 }
 
 
This page took 0.035819 seconds and 4 git commands to generate.