]> andersk Git - moira.git/blobdiff - server/qrtn.qc
Move zephyr notification stuff into call to critical_alert
[moira.git] / server / qrtn.qc
index c7849e304bcc3dade9f51e7c8159d87656cd1162..c951d8cccc65cb723442fa0ddfc2aea7e142e858 100644 (file)
@@ -22,6 +22,7 @@ extern FILE *journal;
 
 #define INGRES_BAD_INT 4111
 #define INGRES_BAD_DATE 4302
+#define INGRES_DEADLOCK 4700
 
 /*
  * ingerr: (supposedly) called when Ingres indicates an error.
@@ -41,11 +42,13 @@ static int ingerr(num)
     case INGRES_BAD_DATE:
        ingres_errno = SMS_DATE;
        break;
+    case INGRES_DEADLOCK:
+       ingres_errno = SMS_DEADLOCK;
+       break;
     default:
        ingres_errno = SMS_INGRES_ERR;
        com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num);
-       sprintf(buf, "Ingres error %d", *num);
-       send_zgram("ingres_error", buf);
+       critical_alert("SMS", "SMS server encountered INGRES ERROR %d", *num);
        return (*num);
     }
     return (0);
@@ -211,9 +214,11 @@ sms_process_query(cl, name, argc, argv_ro, action, actarg)
            status = do_update(q, &Argv[q->argc], qual, action, actarg);
            if (status != SMS_SUCCESS) break;
            table = q->rtable;
-##         repeat replace tblstats (updates = tblstats.updates + 1,
-##                                  modtime = "now")
-##             where tblstats.#table = @table
+           if (strcmp(q->shortname, "sshi") && strcmp(q->shortname, "ssif")) {
+##             repeat replace tblstats (updates = tblstats.updates + 1,
+##                                      modtime = "now")
+##                 where tblstats.#table = @table
+           }
        }
 
        /* execute followup routine (if any) */
@@ -669,7 +674,7 @@ do_update(q, argv, qual, action, actarg)
 ##  where cqual
 
 ##  inquire_equel (errorno = "errorno")
-    if (errorno == 4111)
+    if (errorno == INGRES_BAD_INT)
        return(SMS_INTEGER);
     else if (errorno != 0)
        return(SMS_INGRES_ERR);
This page took 0.192157 seconds and 4 git commands to generate.