Changeset 20059
- Timestamp:
- Oct 10, 2008, 3:28:11 PM (18 years ago)
- Location:
- trunk/Ohana/src/opihi/pcontrol
- Files:
-
- 2 edited
-
CheckBusyJob.c (modified) (4 diffs)
-
CheckDoneJob.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pcontrol/CheckBusyJob.c
r20047 r20059 57 57 buffer = &host[0].comms_buffer; 58 58 job = (Job *) host[0].job; 59 ASSERT (host == (Host *) job[0].host, "invalid host"); 59 60 60 61 /** host is up, need to parse message **/ … … 87 88 return (TRUE); 88 89 } 89 90 ASSERT (outstate != PCONTROL_JOB_DONE, "impossible outstate for job"); 90 91 91 92 /* parse the exit status and sizes of output buffers */ … … 97 98 sscanf (p, "%*s %d", &job[0].stderr.size); 98 99 100 ASSERT (job[0].stdout.size > 0, "job has no output?"); 101 ASSERT (job[0].stderr.size > 0, "job has no output?"); 102 99 103 // XXX runaway job if output too large? 100 104 if (job[0].stdout.size > 0x1000000) abort(); … … 105 109 // don't unlink job and host yet 106 110 PutHost (host, PCONTROL_HOST_BUSY, STACK_BOTTOM); 111 ASSERT (job[0].host, "host not set for job"); 107 112 PutJobSetState (job, PCONTROL_JOB_DONE, STACK_BOTTOM, outstate); 108 113 gettimeofday (&job[0].stop, NULL); -
trunk/Ohana/src/opihi/pcontrol/CheckDoneJob.c
r20047 r20059 36 36 if ((status1 == PCLIENT_HUNG) || (status2 == PCLIENT_HUNG)) { 37 37 PutHost (host, PCONTROL_HOST_BUSY, STACK_BOTTOM); 38 ASSERT (job[0].host, "host not set for job"); 38 39 PutJob (job, PCONTROL_JOB_DONE, STACK_BOTTOM); 39 40 return (FALSE); … … 45 46 host[0].job = NULL; 46 47 PutHost (host, PCONTROL_HOST_DONE, STACK_BOTTOM); 48 49 ASSERT ((job[0].state == PCONTROL_JOB_EXIT) || (job[0].state == PCONTROL_JOB_CRASH), "unexpected job state"); 50 47 51 PutJob (job, job[0].state, STACK_BOTTOM); 48 52
Note:
See TracChangeset
for help on using the changeset viewer.
