Changeset 25872 for trunk/Ohana/src/opihi/pcontrol/StartHost.c
- Timestamp:
- Oct 18, 2009, 10:29:11 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pcontrol/StartHost.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pcontrol/StartHost.c
r12840 r25872 21 21 if (VerboseMode()) gprint (GP_ERR, "failure to start %s\n", host[0].hostname); 22 22 gettimeofday (&now, (void *) NULL); 23 if (ZTIME(host[0].next try) || ZTIME(host[0].lasttry)) {23 if (ZTIME(host[0].next_start_try) || ZTIME(host[0].last_start_try)) { 24 24 /* reset retry period if either is zero */ 25 25 delta = RETRY_BASE; 26 26 } else { 27 delta = 2*DTIME (host[0].nexttry, host[0].lasttry);27 delta = MAX(1.0, 2*DTIME (host[0].next_start_try, host[0].last_start_try)); 28 28 } 29 host[0].next try.tv_sec = now.tv_sec + delta;30 host[0].next try.tv_usec = now.tv_usec;31 host[0].last try.tv_sec = now.tv_sec;32 host[0].last try.tv_usec = now.tv_usec;29 host[0].next_start_try.tv_sec = now.tv_sec + delta; 30 host[0].next_start_try.tv_usec = now.tv_usec; 31 host[0].last_start_try.tv_sec = now.tv_sec; 32 host[0].last_start_try.tv_usec = now.tv_usec; 33 33 PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM); 34 34 return (FALSE); 35 35 } 36 host[0].nexttry.tv_sec = 0; 37 host[0].nexttry.tv_usec = 0; 38 host[0].lasttry.tv_sec = 0; 39 host[0].lasttry.tv_usec = 0; 36 host[0].next_start_try.tv_sec = 0; 37 host[0].next_start_try.tv_usec = 0; 38 host[0].last_start_try.tv_sec = 0; 39 host[0].last_start_try.tv_usec = 0; 40 41 // set the connection time 42 gettimeofday (&host[0].connect_time, (void *) NULL); 40 43 41 44 host[0].stdin_fd = stdio[0];
Note:
See TracChangeset
for help on using the changeset viewer.
