2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

Panic commit.

This commit is contained in:
Ted Lemon
2000-09-27 23:37:44 +00:00
parent 639b70fa45
commit eadee39698
7 changed files with 108 additions and 141 deletions

View File

@@ -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,