$DragonFly: src/sbin/dhclient/common/Attic/dispatch.c.patch,v 1.1 2005/01/04 19:58:54 joerg Exp $ --- dispatch.c.orig 2004-06-10 19:59:16.000000000 +0200 +++ dispatch.c 2004-06-24 17:09:15.000000000 +0200 @@ -86,11 +86,26 @@ void dispatch () { struct timeval tv, *tvp; +#ifdef ENABLE_POLLING_MODE + struct timeval *tvp_new; + TIME cur_time; +#endif isc_result_t status; + tvp = NULL; +#ifdef ENABLE_POLLING_MODE + tvp_new = NULL; +#endif /* Wait for a packet or a timeout... XXX */ do { tvp = process_outstanding_timeouts (&tv); +#ifdef ENABLE_POLLING_MODE + GET_TIME (&cur_time); + add_timeout(cur_time + polling_interval, state_polling, 0, 0, 0); + tvp_new = process_outstanding_timeouts(&tv); + if (tvp != NULL && (tvp -> tv_sec > tvp_new -> tv_sec)) + tvp = tvp_new; +#endif /* ENABLE_POLLING_MODE */ status = omapi_one_dispatch (0, tvp); } while (status == ISC_R_TIMEDOUT || status == ISC_R_SUCCESS); log_fatal ("omapi_one_dispatch failed: %s -- exiting.",