]> andersk Git - moira.git/blobdiff - server/qsetup.dc
changing status field in host table now results in only the target host's
[moira.git] / 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.031721 seconds and 4 git commands to generate.