summaryrefslogtreecommitdiff
path: root/common/buffer.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-08-17 22:54:16 +0000
committerStef Walter <stef@memberwebs.com>2004-08-17 22:54:16 +0000
commit4faa3b65abad58a20c5e7e401361d30188460a83 (patch)
tree5c6bd3f1f2c9cc65ec9fc8d6a22824cde8fc40a1 /common/buffer.c
parent2888f640a34e34d5a85841976fb8937c4a7774a0 (diff)
Better message handling when buffer runs out of memory.
Diffstat (limited to 'common/buffer.c')
-rw-r--r--common/buffer.c7
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;
}
}