summaryrefslogtreecommitdiff
path: root/omapip/support.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2000-09-27 23:37:44 +0000
committerTed Lemon <source@isc.org>2000-09-27 23:37:44 +0000
commiteadee3969819bdd7c97a95fea2afcb9e0947e536 (patch)
treed3c1898a8fd404f2b3f5a364b21667518d978895 /omapip/support.c
parent639b70fa4527828670b93adf53a6b4d9f67ed69d (diff)
downloadisc-dhcp-eadee3969819bdd7c97a95fea2afcb9e0947e536.tar.gz
Panic commit.
Diffstat (limited to 'omapip/support.c')
-rw-r--r--omapip/support.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/omapip/support.c b/omapip/support.c
index f9f14887..9f92ad18 100644
--- a/omapip/support.c
+++ b/omapip/support.c
@@ -290,13 +290,43 @@ isc_result_t omapi_set_value (omapi_object_t *h,
omapi_typed_data_t *value)
{
omapi_object_t *outer;
+ isc_result_t status;
+
+ if (!value) {
+ log_info ("omapi_set_value (%.*s, NULL)",
+ (int)name -> len, name -> value);
+ } else if (value -> type == omapi_datatype_int) {
+ log_info ("omapi_set_value (%.*s, %ld)",
+ (int)name -> len, name -> value,
+ (long)value -> u.integer);
+ } else if (value -> type == omapi_datatype_string) {
+ log_info ("omapi_set_value (%.*s, %.*s)",
+ (int)name -> len, name -> value,
+ (int)value -> u.buffer.len, value -> u.buffer.value);
+ } else if (value -> type == omapi_datatype_data) {
+ log_info ("omapi_set_value (%.*s, %ld %lx)",
+ (int)name -> len, name -> value,
+ (long)value -> u.buffer.len,
+ (unsigned long)value -> u.buffer.value);
+ } else if (value -> type == omapi_datatype_object) {
+ log_info ("omapi_set_value (%.*s, %s)",
+ (int)name -> len, name -> value,
+ value -> u.object
+ ? (value -> u.object -> type
+ ? value -> u.object -> type -> name
+ : "(unknown object)")
+ : "(unknown object)");
+ }
for (outer = h; outer -> outer; outer = outer -> outer)
;
if (outer -> type -> set_value)
- return (*(outer -> type -> set_value)) (outer,
- id, name, value);
- return ISC_R_NOTFOUND;
+ status = (*(outer -> type -> set_value)) (outer,
+ id, name, value);
+ else
+ status = ISC_R_NOTFOUND;
+ log_info (" ==> %s", isc_result_totext (status));
+ return status;
}
isc_result_t omapi_set_value_str (omapi_object_t *h,