]> andersk Git - moira.git/commitdiff
added motd checking
authormar <mar>
Wed, 28 Jun 1989 11:54:47 +0000 (11:54 +0000)
committermar <mar>
Wed, 28 Jun 1989 11:54:47 +0000 (11:54 +0000)
clients/blanche/blanche.c

index ac815c7699e332aedcdd7c789c9b35f3d5024453..63d35cff7dac491583fd97dd258a4e0cd4267cf9 100644 (file)
@@ -63,7 +63,7 @@ char **argv;
 {
     int status;
     char **arg = argv;
-    char *membervec[3];
+    char *membervec[3], *motd;
     struct member *memberstruct;
 
     /* clear all flags & lists */
@@ -161,6 +161,16 @@ char **argv;
        com_err(whoami, status, " unable to connect to SMS");
        exit(2);
     }
+    if ( status = sms_motd(&motd) ) {
+        com_err(whoami, status, " unable to check server status");
+       exit(2);
+    }
+    if (motd) {
+       fprintf(stderr, "The SMS server is currently unavailable:\n%s\n", motd);
+       sms_disconnect();
+       exit(2);
+    }
+
     if (!noauth && (status = sms_auth("blanche"))) {
        com_err(whoami, status, " unable to authenticate to SMS");
        com_err(whoami, 0,
This page took 0.036564 seconds and 5 git commands to generate.