mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 05:17:57 +00:00
Don't allow writes on a closed connection.
This commit is contained in:
parent
06fa897b5e
commit
c1d58ae6ec
@ -292,6 +292,12 @@ isc_result_t omapi_connection_copyin (omapi_object_t *h,
|
|||||||
return ISC_R_INVALIDARG;
|
return ISC_R_INVALIDARG;
|
||||||
c = (omapi_connection_object_t *)h;
|
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) {
|
if (c -> outbufs) {
|
||||||
for (buffer = c -> outbufs;
|
for (buffer = c -> outbufs;
|
||||||
buffer -> next; buffer = buffer -> next)
|
buffer -> next; buffer = buffer -> next)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user