summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-04-18 18:56:10 +0000
committerTed Lemon <source@isc.org>2001-04-18 18:56:10 +0000
commit7243b3690d11f81b5df7090d6d6d12104fcce3a5 (patch)
treed1b97a0098df818068074a79a54663b06f5cd71d
parent36ed3a00a5191c04c4dc063858de5b24cf77e3b4 (diff)
downloadisc-dhcp-7243b3690d11f81b5df7090d6d6d12104fcce3a5.tar.gz
If we find an active IO object with a bad descriptor, unregister it.
-rw-r--r--omapip/connection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/omapip/connection.c b/omapip/connection.c
index b87e9867..082d89b5 100644
--- a/omapip/connection.c
+++ b/omapip/connection.c
@@ -670,11 +670,15 @@ isc_result_t omapi_connection_reaper (omapi_object_t *h)
log_debug ("omapi_connection_reaper(): disconnect");
#endif
omapi_disconnect (h, 1);
+ if (c -> outer && c -> outer -> type == omapi_type_io_object)
+ omapi_unregister_io_object (c -> outer);
}
if (c -> state == omapi_connection_closed) {
#ifdef DEBUG_PROTOCOL
log_debug ("omapi_connection_reaper(): closed");
#endif
+ if (c -> outer && c -> outer -> type == omapi_type_io_object)
+ omapi_unregister_io_object (c -> outer);
return ISC_R_NOTCONNECTED;
}
return ISC_R_SUCCESS;