]> andersk Git - moira.git/blobdiff - update/client.c
improve parsing of arguement to connect
[moira.git] / update / client.c
index 709d1f9de5091ba361c3f76eec82f998cd83a5c9..6e48a0e1cfff38cb80a197df7e57a303ea1dfb2a 100644 (file)
@@ -10,7 +10,9 @@ static char *rcsid_client2_c = "$Header$";
 /*
  * MODULE IDENTIFICATION:
  *     $Header$
- *     Copyright 1987 MIT Project Athena.
+ *     Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ *     For copying and distribution information, please see the file
+ *     <mit-copyright.h>.
  * DESCRIPTION:
  *     This code handles the actual distribution of data files
  *     to servers in the SMS server-update program.
@@ -22,6 +24,7 @@ static char *rcsid_client2_c = "$Header$";
  *     sms_update_server
  */
 
+#include <mit-copyright.h>
 #include <stdio.h>
 #include <strings.h>
 #include <gdb.h>
@@ -34,7 +37,7 @@ static char *rcsid_client2_c = "$Header$";
 #include <krb.h>
 
 extern char *malloc();
-extern int errno;
+extern int errno, dbg;
 
 static char buf[BUFSIZ];
 static int code;
@@ -53,7 +56,7 @@ CONNECTION conn;
  * RETURN VALUE:
  *     void
  * SIDE EFFECTS:
- *     Initializes GDB library and SMSU error table.
+ *     Initializes GDB library.
  * PROBLEMS:
  *
  */
@@ -64,7 +67,6 @@ initialize()
 
     if (!initialized) {
        gdb_init();
-       init_smsU_err_tbl();
        initialized++;
     }
 }
@@ -234,7 +236,7 @@ static
 execute(path)
     char *path;
 {
-    union wait response;
+    int response;
     STRING data;
     register int code;
     
@@ -246,15 +248,10 @@ execute(path)
     code = receive_object(conn, (char *)&response, INTEGER_T);
     if (code)
        return(connection_errno(conn));
-    if (response.w_retcode) {
-/****************************************************************
- * The following line is there because the current update servers
- * don't return the correct error code when an update fails.  Remove
- * this line when they are fixed.  -mar  7/26/88
- ****************************************************************/
-       return(SMS_INTERNAL);
-/*     return(response.w_retcode); */
-    }
+    if (dbg & DBG_TRACE)
+      com_err(whoami, response, "execute returned %d", response);
+    if (response)
+      return(response);
     return(SMS_SUCCESS);
 }
 
This page took 0.150047 seconds and 4 git commands to generate.