]> andersk Git - moira.git/commitdiff
changing status field in host table now results in only the target host's
authortom <tom>
Tue, 7 Dec 1993 17:03:51 +0000 (17:03 +0000)
committertom <tom>
Tue, 7 Dec 1993 17:03:51 +0000 (17:03 +0000)
status mod time to be changed

allow hosts to be entered with status = RESERVED

server/qsetup.dc

index 7d6eaf38e8716a23b1baa2f60e9481ea17f815af..d23e8d448a2519514bdf12f3ad188f98eb1b3469 100644 (file)
@@ -976,14 +976,15 @@ setup_ahst(q,argv,cl)
 
     /* status checking */
     value = atoi(argv[7+row]);
-    if (row == 0 && !(value == 1 || value == 3))
+    if (row == 0 && !(value == 1 || value == 0))
       return(MR_TYPE);
     if (row == 1) {
        id = *(int *)argv[0];
        EXEC SQL SELECT status INTO :cnt FROM machine WHERE mach_id = :id;
        if (ingres_errno) return(mr_errcode);
        if (value != cnt) {
-           EXEC SQL UPDATE machine SET statuschange = date('now');
+           EXEC SQL UPDATE machine SET statuschange = date('now')
+                 WHERE mach_id = :id;
        }
     }
 
This page took 0.189927 seconds and 5 git commands to generate.