sbsv2/raptor/util/talon/talon.c
branchfix
changeset 407 bda21097164c
parent 353 bb0bded637e9
equal deleted inserted replaced
364:f4ccb4c573da 407:bda21097164c
   584 				if (p->causeofdeath == PROC_TIMEOUTDEATH)
   584 				if (p->causeofdeath == PROC_TIMEOUTDEATH)
   585 					reasonstr = " reason='timeout'";
   585 					reasonstr = " reason='timeout'";
   586 
   586 
   587 				if (p->returncode != 0)
   587 				if (p->returncode != 0)
   588 				{
   588 				{
   589 					char *exitstr = force_success ? "failed" : retries > 0 ? "retry" : "failed";
   589 					char *exitstr = (force_success || retries <= 0) ? "failed" : "retry";
   590 					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='%s' code='%d' attempt='%d'%s%s />", exitstr, p->returncode, attempt, flagsstr, reasonstr );
   590 					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='%s' code='%d' attempt='%d'%s%s />", exitstr, p->returncode, attempt, flagsstr, reasonstr );
   591 				} else {
   591 				} else {
   592 					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='ok' attempt='%d'%s%s />", attempt, flagsstr, reasonstr );
   592 					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='ok' attempt='%d'%s%s />", attempt, flagsstr, reasonstr );
   593 				}
   593 				}
   594 				status[STATUS_STRMAX-1] = '\0';
   594 				status[STATUS_STRMAX-1] = '\0';