sbsv2/raptor/util/talon/talon.c
branchfix
changeset 409 1b444ea0baec
parent 407 bda21097164c
equal deleted inserted replaced
391:877485b44765 409:1b444ea0baec
   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';