diff options
author | Stef Walter <stef@memberwebs.com> | 2004-08-17 22:54:16 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-08-17 22:54:16 +0000 |
commit | 4faa3b65abad58a20c5e7e401361d30188460a83 (patch) | |
tree | 5c6bd3f1f2c9cc65ec9fc8d6a22824cde8fc40a1 /common | |
parent | 2888f640a34e34d5a85841976fb8937c4a7774a0 (diff) |
Better message handling when buffer runs out of memory.
Diffstat (limited to 'common')
-rw-r--r-- | common/buffer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/buffer.c b/common/buffer.c index 6064cbe..cc5480f 100644 --- a/common/buffer.c +++ b/common/buffer.c @@ -71,7 +71,6 @@ void buffer_bump(ha_buffer_t* buf, int count) intl = (internal_t*)malloc(allocated); if(!intl) { - ha_messagex(NULL, LOG_CRIT, "out of memory"); buf->_dt = NULL; buf->_pp = buf->_rp = NULL; return; @@ -221,10 +220,10 @@ int ha_bufreadline(int fd, ha_buffer_t* buf) /* Fatal errors */ else if(l == -1) { - if(errno != EINTR) - ha_message(NULL, LOG_ERR, "couldn't read data"); + if(errno == EINTR) + return 0; - return 0; + return -1; } } |