diff options
author | Stef Walter <stef@memberwebs.com> | 2004-08-17 23:17:07 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-08-17 23:17:07 +0000 |
commit | 6df85597413840846409f7434941ed0f10ec4a38 (patch) | |
tree | 71968501063d017ae312a2a1fc7bf470bf19a0f5 | |
parent | 4faa3b65abad58a20c5e7e401361d30188460a83 (diff) |
- Proper separation between common and daemon directories.
-rw-r--r-- | common/buffer.c | 3 | ||||
-rw-r--r-- | common/compat.c | 2 | ||||
-rw-r--r-- | common/compat.h | 9 | ||||
-rw-r--r-- | daemon/httpauthd.c | 8 | ||||
-rw-r--r-- | daemon/usuals.h | 10 |
5 files changed, 18 insertions, 14 deletions
diff --git a/common/buffer.c b/common/buffer.c index cc5480f..096fac8 100644 --- a/common/buffer.c +++ b/common/buffer.c @@ -1,8 +1,9 @@ -#include "usuals.h" +#include "compat.h" #include "buffer.h" #include "stringx.h" +#include <errno.h> #include <syslog.h> /* ----------------------------------------------------------------------- diff --git a/common/compat.c b/common/compat.c index daddbd2..c412605 100644 --- a/common/compat.c +++ b/common/compat.c @@ -1,6 +1,6 @@ -#include "usuals.h" #include "compat.h" +#include <stdlib.h> #ifndef HAVE_REALLOCF diff --git a/common/compat.h b/common/compat.h index c7f86cc..c292652 100644 --- a/common/compat.h +++ b/common/compat.h @@ -1,5 +1,4 @@ - #ifndef _COMPAT_H_ #define _COMPAT_H_ @@ -9,6 +8,14 @@ #include <sys/types.h> + +#ifdef _DEBUG + #include "assert.h" + #define ASSERT assert +#else + #define ASSERT +#endif + #ifndef HAVE_STDARG_H # error ERROR: Must have a working stdarg.h header #else diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c index 8b8617e..ad2f365 100644 --- a/daemon/httpauthd.c +++ b/daemon/httpauthd.c @@ -619,7 +619,10 @@ static int httpauth_read(ha_request_t* rq, int ifd) r = ha_bufreadline(ifd, rq->buf); if(r == -1) + { + ha_message(rq, LOG_ERR, "error reading from socket"); return -1; + } /* Check if this is the last line */ if(r == 0) @@ -686,7 +689,10 @@ static int httpauth_read(ha_request_t* rq, int ifd) r = ha_bufreadline(ifd, rq->buf); if(r == -1) + { + ha_message(rq, LOG_ERR, "error reading from socket"); return -1; + } /* Check if this is the last line */ if(r == 0) @@ -1246,7 +1252,7 @@ static int config_parse(const char* file, ha_buffer_t* buf) ha_bufskip(buf); if((more = ha_bufreadline(fd, buf)) == -1) - return -1; + err(1, "couldn't read from configuration file: %s", file); line++; diff --git a/daemon/usuals.h b/daemon/usuals.h index b97c85d..a11d844 100644 --- a/daemon/usuals.h +++ b/daemon/usuals.h @@ -5,8 +5,6 @@ #include <sys/types.h> -#include "config.h" - #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -39,12 +37,4 @@ #define CHECK_BUF(b) (ha_buferr(b) ? (ha_memerr(NULL), 1) : 0) #define CHECK_RBUF(rq) (ha_buferr((rq)->buf) ? (ha_memerr(rq), 1) : 0) - -#ifdef _DEBUG - #include "assert.h" - #define ASSERT assert -#else - #define ASSERT -#endif - #endif /* __USUALS_H__ */ |