From: tom Date: Tue, 7 Dec 1993 17:03:51 +0000 (+0000) Subject: changing status field in host table now results in only the target host's X-Git-Tag: release77~37 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/1195dd6a338f745b96a33ea195ee84bd257cf2b5?hp=b61b1212ebe7ab716ce0de919ee3991004c63164 changing status field in host table now results in only the target host's status mod time to be changed allow hosts to be entered with status = RESERVED --- diff --git a/server/qsetup.dc b/server/qsetup.dc index 7d6eaf38..d23e8d44 100644 --- a/server/qsetup.dc +++ b/server/qsetup.dc @@ -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; } }