2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 13:28:14 +00:00

Don't allow writes on a closed connection.

This commit is contained in:
Ted Lemon 2001-04-20 20:14:07 +00:00
parent 06fa897b5e
commit c1d58ae6ec

View File

@ -292,6 +292,12 @@ isc_result_t omapi_connection_copyin (omapi_object_t *h,
return ISC_R_INVALIDARG;
c = (omapi_connection_object_t *)h;
/* If the connection is closed, return an error if the caller
tries to copy in. */
if (c -> state == omapi_connection_disconnecting ||
c -> state == omapi_connection_closed)
return ISC_R_NOTCONNECTED;
if (c -> outbufs) {
for (buffer = c -> outbufs;
buffer -> next; buffer = buffer -> next)