From: Ted Lemon Date: Tue, 12 Sep 2000 21:53:15 +0000 (+0000) Subject: Print more information when bad socket is found. X-Git-Tag: V3-BETA-2-PATCH-4~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=645eab7becb284beb3dacb81313fe7a8e26976ea;p=thirdparty%2Fdhcp.git Print more information when bad socket is found. --- diff --git a/omapip/dispatch.c b/omapip/dispatch.c index 2701d7b95..0a8a01b16 100644 --- a/omapip/dispatch.c +++ b/omapip/dispatch.c @@ -326,10 +326,32 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo, obj -> outer; obj = obj -> outer) ; - for (; obj; obj = obj -> inner) - log_error ("Object %lx %s", - (unsigned long)obj, - obj -> type -> name); + for (; obj; obj = obj -> inner) { + omapi_value_t *ov; + int len; + const char *s; + ov = (omapi_value_t *)0; + omapi_get_value_str (obj, + (omapi_object_t *)0, + "name", &ov); + if (ov && ov -> value && + (ov -> value -> type == + omapi_datatype_string)) { + s = (char *) + ov -> value -> u.buffer.value; + len = ov -> value -> u.buffer.len; + } else { + s = ""; + len = 0; + } + log_error ("Object %lx %s%s%.*s", + (unsigned long)obj, + obj -> type -> name, + len ? " " : "", + len, s); + if (len) + omapi_value_dereference (&ov, MDL); + } status = (*(io -> reaper)) (io -> inner); goto again; }