void do_hosts(char *service)
{
EXEC SQL BEGIN DECLARE SECTION;
- char type[SERVERS_TYPE_SIZE], host[MACHINE_NAME_SIZE];
+ char type[SERVERS_TYPE_SIZE], host[MACHINE_NAME_SIZE], *name;
char target[SERVERS_TARGET_FILE_SIZE], script[SERVERS_SCRIPT_SIZE];
const char *errmsg;
int status = 0, dfgen, replicated, mid;
time_t now;
EXEC SQL END DECLARE SECTION;
- struct save_queue sq;
+ struct save_queue *sq;
time(&now);
mr_init();
errmsg = error_message(status);
EXEC SQL UPDATE serverhosts SET hosterrmsg = :errmsg,
inprogress = 0, success = 0, ltt = :now
- WHERE service = UPPER(:service) AND mach_id = :mach_id;
+ WHERE service = UPPER(:service) AND mach_id = :mid;
if (!SOFT_FAIL(status))
{
EXEC SQL UPDATE serverhosts SET hosterror = :status
- WHERE CURRENT OF csr_hst1;
+ WHERE service = UPPER(:service) AND mach_id = :mid;
critical_alert("DCM", "DCM updating %s:%s: %s",
service, name, errmsg);
}