--- dhcpctl/dhcpctl.c.orig 2011-01-14 12:37:36.000000000 +0600 +++ dhcpctl/dhcpctl.c 2011-01-14 14:33:40.000000000 +0600 @@ -34,6 +34,7 @@ #include "dhcpd.h" #include +#include #include "dhcpctl.h" omapi_object_type_t *dhcpctl_callback_type; @@ -111,8 +112,11 @@ omapi_object_dereference (connection, MDL); return status; } - - status = omapi_wait_for_completion (*connection, 0); + // Timeout = 1s. + struct timeval tv; + gettimeofday (&tv, (struct timezone *)0); + tv.tv_sec++; + status = omapi_wait_for_completion (*connection, &tv); if (status != ISC_R_SUCCESS) { omapi_object_dereference (connection, MDL); return status; --- omapip/generic.c.orig 2010-12-28 11:47:38.000000000 +0600 +++ omapip/generic.c 2010-12-28 11:31:56.000000000 +0600 @@ -68,7 +68,7 @@ the generic object, and if so, replace the current value with the new one. */ for (i = 0; i < g -> nvalues; i++) { - if (!omapi_data_string_cmp (name, g -> values [i] -> name)) { + if (g->values[i] && !omapi_data_string_cmp (name, g -> values [i] -> name)) { /* There's an inconsistency here: the standard behaviour of a set_values method when passed a matching name and a null value is