]> andersk Git - moira.git/commitdiff
added do_sms_query which will reconnect on timeout
authormar <mar>
Mon, 3 Oct 1988 17:51:24 +0000 (17:51 +0000)
committermar <mar>
Mon, 3 Oct 1988 17:51:24 +0000 (17:51 +0000)
clients/moira/utils.c

index e9d719bafc447736b1cc6ec1280fae6bbd3cf9a3..dd7f2379c9d09b65de176e5f6784f2776ef6942c 100644 (file)
@@ -896,13 +896,30 @@ char  **pointer;
 }
 
 
-/*
- * Local Variables:
- * mode: c
- * c-indent-level: 4
- * c-continued-statement-offset: 4
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * End:
- */
+do_sms_query(name, argc, argv, proc, hint)
+char *name;
+int argc;
+char **argv;
+int (*proc)();
+char *hint;
+{
+    int status;
+    extern char *whoami;
+
+    status = sms_query(name, argc, argv, proc, hint);
+    if (status != SMS_ABORTED)
+      return(status);
+    status = sms_connect();
+    if (status) {
+       com_err(whoami, status, " while re-connecting to server");
+       return(SMS_ABORTED);
+    }
+    status = sms_auth(whoami);
+    if (status) {
+       com_err(whoami, status, " while re-authenticating to server");
+       return(SMS_ABORTED);
+    }
+    status = sms_query(name, argc, argv, proc, hint);
+    return(status);
+}
+
This page took 0.039185 seconds and 5 git commands to generate.