]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
If we find an active IO object with a bad descriptor, unregister it.
authorTed Lemon <source@isc.org>
Wed, 18 Apr 2001 18:56:10 +0000 (18:56 +0000)
committerTed Lemon <source@isc.org>
Wed, 18 Apr 2001 18:56:10 +0000 (18:56 +0000)
omapip/connection.c

index b87e98677b2f17b27f5ed487024b47a2ebc613dd..082d89b5185b067a901904984773ec2ca886804d 100644 (file)
@@ -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;