summaryrefslogtreecommitdiff
path: root/common/spio.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-03 01:34:14 +0000
committerStef Walter <stef@memberwebs.com>2004-09-03 01:34:14 +0000
commit4375d1aefd0f484a50c5d6773d71ac62bc01e44c (patch)
tree1121bf24d3a2b9add0bd03b44c3a33647eb910fe /common/spio.c
parent6e142a434645a27b6fa07bbfd2d06228d8fc4fd9 (diff)
Configuration file for clamsmtp
Diffstat (limited to 'common/spio.c')
-rw-r--r--common/spio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/spio.c b/common/spio.c
index 1794118..a2694bb 100644
--- a/common/spio.c
+++ b/common/spio.c
@@ -90,7 +90,7 @@ static void log_io_data(clamsmtp_context_t* ctx, clio_t* io, const char* data, i
memcpy(buf, data, len);
buf[len] = 0;
- messagex(ctx, LOG_DEBUG, "%s%s%s", GET_IO_NAME(io),
+ messagex(0, LOG_DEBUG, "%s%s%s", GET_IO_NAME(io),
read ? " < " : " > ", buf);
data += pos;
@@ -116,8 +116,8 @@ int clio_connect(clamsmtp_context_t* ctx, clio_t* io, struct sockaddr_any* sany,
if((io->fd = socket(SANY_TYPE(*sany), SOCK_STREAM, 0)) == -1)
RETURN(-1);
- if(setsockopt(io->fd, SOL_SOCKET, SO_RCVTIMEO, &g_timeout, sizeof(g_timeout)) == -1 ||
- setsockopt(io->fd, SOL_SOCKET, SO_SNDTIMEO, &g_timeout, sizeof(g_timeout)) == -1)
+ if(setsockopt(io->fd, SOL_SOCKET, SO_RCVTIMEO, &g_state.timeout, sizeof(g_state.timeout)) == -1 ||
+ setsockopt(io->fd, SOL_SOCKET, SO_SNDTIMEO, &g_state.timeout, sizeof(g_state.timeout)) == -1)
messagex(ctx, LOG_WARNING, "couldn't set timeouts on connection");
if(connect(io->fd, &SANY_ADDR(*sany), SANY_LEN(*sany)) == -1)
@@ -183,7 +183,7 @@ int clio_select(clamsmtp_context_t* ctx, clio_t** io)
/* Select on the above */
- switch(select(FD_SETSIZE, &mask, NULL, NULL, &g_timeout))
+ switch(select(FD_SETSIZE, &mask, NULL, NULL, &g_state.timeout))
{
case 0:
messagex(ctx, LOG_ERR, "network operation timed out");
@@ -244,7 +244,7 @@ int clio_read_line(clamsmtp_context_t* ctx, clio_t* io, int opts)
if(errno == EINTR)
{
/* When the application is quiting */
- if(g_quit)
+ if(g_state.quit)
return -1;
/* For any other signal we go again */
@@ -380,7 +380,7 @@ int clio_write_data_raw(clamsmtp_context_t* ctx, clio_t* io, unsigned char* buf,
if(errno == EINTR)
{
/* When the application is quiting */
- if(g_quit)
+ if(g_state.quit)
return -1;
/* For any other signal we go again */