Changeset 8424 for trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c
- Timestamp:
- Aug 18, 2006, 1:44:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c
r8296 r8424 8 8 Job *job; 9 9 10 /* if this host has been marked to be turned off, do that and return */ 11 if (host[0].markoff) { 12 host[0].markoff = FALSE; 13 StopHost (host); 14 OffHost (host); 15 return (TRUE); 16 } 17 10 18 /* search the JOB_PENDING stack for an appropriate job */ 11 19 stack = GetJobStack (PCONTROL_JOB_PENDING); … … 16 24 job = (Job *) stack[0].object[i]; 17 25 if (job[0].mode != PCONTROL_JOB_NEEDHOST) continue; 18 if (job[0].hostname == NULL) { 19 gprint (GP_ERR, "programming error: NEEDHOST hostname missing\n"); 20 exit (2); 21 } 26 ASSERT (job[0].hostname != NULL, "NEEDHOST hostname missing"); 22 27 if (strcasecmp (job[0].hostname, host[0].hostname)) continue; 23 28 … … 29 34 RemoveStackEntry (stack, i); 30 35 UnlockStack (stack); 31 StartJob (job );36 StartJob (job, host); 32 37 return (TRUE); 33 38 } … … 37 42 job = (Job *) stack[0].object[i]; 38 43 if (job[0].mode != PCONTROL_JOB_WANTHOST) continue; 39 if (job[0].hostname == NULL) { 40 gprint (GP_ERR, "programming error: WANTHOST hostname missing\n"); 41 exit (2); 42 } 44 ASSERT (job[0].hostname != NULL, "WANTHOST hostname missing"); 43 45 if (strcasecmp (job[0].hostname, host[0].hostname)) continue; 44 46 … … 50 52 RemoveStackEntry (stack, i); 51 53 UnlockStack (stack); 52 StartJob (job );54 StartJob (job, host); 53 55 return (TRUE); 54 56 } … … 66 68 RemoveStackEntry (stack, i); 67 69 UnlockStack (stack); 68 StartJob (job );69 return (TRUE);70 StartJob (job, host); 71 return (TRUE); 70 72 } 71 73 … … 76 78 job = (Job *) stack[0].object[i]; 77 79 if (job[0].mode != PCONTROL_JOB_WANTHOST) continue; 78 // test the job age and skip if too young80 // XXX test the job age and skip if too young 79 81 80 82 /* we have found an appropriate job; link it to the host and send to StartJob */ … … 85 87 RemoveStackEntry (stack, i); 86 88 UnlockStack (stack); 87 StartJob (job );89 StartJob (job, host); 88 90 return (TRUE); 89 91 }
Note:
See TracChangeset
for help on using the changeset viewer.
