From 4faa3b65abad58a20c5e7e401361d30188460a83 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 17 Aug 2004 22:54:16 +0000 Subject: Better message handling when buffer runs out of memory. --- daemon/ntlm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'daemon/ntlm.c') diff --git a/daemon/ntlm.c b/daemon/ntlm.c index ab6e5e4..8e1aa20 100644 --- a/daemon/ntlm.c +++ b/daemon/ntlm.c @@ -406,8 +406,8 @@ int ntlm_auth_ntlm(ha_request_t* rq, ntlm_context_t* ctx, void* key, ha_bufenc64(rq->buf, (unsigned char*)&msg, sizeof(msg)); } - if(ha_buferr(rq->buf)) - RETURN(HA_FALSE); + if(CHECK_RBUF(rq)) + RETURN(HA_CRITERROR); /* * TODO: Our callers need to be able to keep alive @@ -513,7 +513,7 @@ int ntlm_auth_ntlm(ha_request_t* rq, ntlm_context_t* ctx, void* key, finally: - if(ha_buferr(rq->buf)) + if(CHECK_RBUF(rq)) ret = HA_CRITERROR; if(conn) @@ -759,7 +759,7 @@ int ntlm_process(ha_request_t* rq) { ha_bufmcat(rq->buf, HA_PREFIX_BASIC, "realm=\"", rq->context->realm, "\"", NULL); - if(ha_buferr(rq->buf)) + if(CHECK_RBUF(rq)) return HA_CRITERROR; ha_addheader(rq, "WWW-Authenticate", ha_bufdata(rq->buf)); -- cgit v1.2.3