From 7194987f27c6d78ba4db59dbb9ab39f8fa4311be Mon Sep 17 00:00:00 2001 From: robertc <> Date: Mon, 14 Oct 2002 15:34:29 +0000 Subject: [PATCH] prevent segfault --- src/http.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/http.cc b/src/http.cc index 2add703874..afbc9e5bb0 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.398 2002/10/14 08:47:47 hno Exp $ + * $Id: http.cc,v 1.399 2002/10/14 09:34:29 robertc Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -66,7 +66,8 @@ httpStateFree(int fd, void *data) { HttpStateData *httpState = static_cast(data); #if DELAY_POOLS - delayClearNoDelay(fd); + if (fd >= 0) + delayClearNoDelay(fd); #endif if (httpState == NULL) return; @@ -558,6 +559,7 @@ static void httpReadReply(int fd, char *buf, size_t len, comm_err_t flag, int xerrno,void *data) { HttpStateData *httpState = static_cast(data); + assert (fd == httpState->fd); httpState->readReply (fd, buf, len, flag, xerrno, data); } -- 2.47.2