summaryrefslogtreecommitdiff
path: root/dhcpctl/dhcpctl.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2000-10-01 21:40:40 +0000
committerTed Lemon <source@isc.org>2000-10-01 21:40:40 +0000
commit3f75c8fa05c2b0e4eb347f67f247353ecc612f4e (patch)
tree04ebde47ecc38d7cf03ec1d0568a0797c16d8bdd /dhcpctl/dhcpctl.c
parenteaa84150fd1d8ffe5a0f58078aaa9d6c74585adf (diff)
downloadisc-dhcp-3f75c8fa05c2b0e4eb347f67f247353ecc612f4e.tar.gz
Set the remote handle when updating or requesting a refresh of an object.
Diffstat (limited to 'dhcpctl/dhcpctl.c')
-rw-r--r--dhcpctl/dhcpctl.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/dhcpctl/dhcpctl.c b/dhcpctl/dhcpctl.c
index 2bc6550e..60d6e065 100644
--- a/dhcpctl/dhcpctl.c
+++ b/dhcpctl/dhcpctl.c
@@ -393,6 +393,11 @@ dhcpctl_status dhcpctl_object_update (dhcpctl_handle connection,
{
isc_result_t status;
omapi_object_t *message = (omapi_object_t *)0;
+ dhcpctl_remote_object_t *ro;
+
+ if (h -> type != dhcpctl_remote_type)
+ return ISC_R_INVALIDARG;
+ ro = (dhcpctl_remote_object_t *)h;
status = omapi_message_new (&message, MDL);
if (status != ISC_R_SUCCESS) {
@@ -405,6 +410,7 @@ dhcpctl_status dhcpctl_object_update (dhcpctl_handle connection,
omapi_object_dereference (&message, MDL);
return status;
}
+
status = omapi_set_object_value (message, (omapi_object_t *)0,
"object", h);
if (status != ISC_R_SUCCESS) {
@@ -412,6 +418,13 @@ dhcpctl_status dhcpctl_object_update (dhcpctl_handle connection,
return status;
}
+ status = omapi_set_int_value (message, (omapi_object_t *)0, "handle",
+ (int)(ro -> remote_handle));
+ if (status != ISC_R_SUCCESS) {
+ omapi_object_dereference (&message, MDL);
+ return status;
+ }
+
omapi_message_register (message);
status = omapi_protocol_send_message (connection -> outer,
(omapi_object_t *)0,
@@ -429,6 +442,11 @@ dhcpctl_status dhcpctl_object_refresh (dhcpctl_handle connection,
{
isc_result_t status;
omapi_object_t *message = (omapi_object_t *)0;
+ dhcpctl_remote_object_t *ro;
+
+ if (h -> type != dhcpctl_remote_type)
+ return ISC_R_INVALIDARG;
+ ro = (dhcpctl_remote_object_t *)h;
status = omapi_message_new (&message, MDL);
if (status != ISC_R_SUCCESS) {
@@ -442,7 +460,7 @@ dhcpctl_status dhcpctl_object_refresh (dhcpctl_handle connection,
return status;
}
status = omapi_set_int_value (message, (omapi_object_t *)0,
- "handle", (int)(h -> handle));
+ "handle", (int)(ro -> remote_handle));
if (status != ISC_R_SUCCESS) {
omapi_object_dereference (&message, MDL);
return status;