]> andersk Git - moira.git/commitdiff
be more paranoid about check query statuses
authormar <mar>
Thu, 29 Jun 1989 14:36:57 +0000 (14:36 +0000)
committermar <mar>
Thu, 29 Jun 1989 14:36:57 +0000 (14:36 +0000)
dcm/dcm.c

index 8dfca839b937fa78f32c3132b199606655f28873..bfb5cfab103804817de197e41993b206da04df2d 100644 (file)
--- a/dcm/dcm.c
+++ b/dcm/dcm.c
@@ -183,7 +183,8 @@ do_services()
                dfgen_prog, SMS_DIR, service);
        gettimeofday(&tv, &tz);
        if (status = sms_query("get_server_info", 1, qargv, getsvinfo, &svc)) {
-           com_err(whoami, status, " getting service %s info", service);
+           com_err(whoami, status, " getting service %s info, skipping to next service", service);
+           continue;
        }
        svc.service = strsave(service);
        qargv[0] = strsave(service);
@@ -250,6 +251,14 @@ do_services()
                qargv[3] = strsave("0");
                status = sms_query("set_server_internal_flags", 6, qargv,
                                   scream, NULL);
+               if (status) {
+                   com_err(whoami, status,
+                           " setting service state, trying again");
+                   status = sms_query("set_server_internal_flags", 6, qargv,
+                                      scream, NULL);
+                   if (status)
+                     com_err(whoami, status, " setting service state again");
+               }
                close(lock_fd);
                free(qargv[0]);
                free(qargv[1]);
@@ -400,6 +409,14 @@ struct service *svc;
                qargv[5] = strsave(svc->errmsg);
                status = sms_query("set_server_internal_flags",
                                   6, qargv, scream, NULL);
+               if (status) {
+                   com_err(whoami, status,
+                           " setting service state, trying again");
+                   status = sms_query("set_server_internal_flags",
+                                      6, qargv, scream, NULL);
+                   if (status)
+                     com_err(whoami, status, " setting service state again");
+               }
                free(qargv[0]);
                free(qargv[1]);
                free(qargv[2]);
@@ -412,6 +429,14 @@ struct service *svc;
                free(argv[5]);
                status = sms_query("set_server_host_internal",
                                   9, argv,scream,NULL);
+               if (status) {
+                   com_err(whoami, status,
+                           " setting host state, trying again");
+                   status = sms_query("set_server_host_internal",
+                                      9, argv,scream,NULL);
+                   if (status)
+                     com_err(whoami, status, " setting host state again");
+               }
                return(-1);
            }
            free(argv[2]);
@@ -420,6 +445,12 @@ struct service *svc;
        argv[4] = "0";
        close(lock_fd);
        status = sms_query("set_server_host_internal", 9, argv,scream,NULL);
+       if (status) {
+           com_err(whoami, status, " setting host state, trying again");
+           status = sms_query("set_server_host_internal", 9, argv,scream,NULL);
+           if (status)
+             com_err(whoami, status, " setting host state again");
+       }
     free_mach:
        free(machine);
        close(lock_fd);
This page took 0.11678 seconds and 5 git commands to generate.