summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan
Side-by-side diff
Diffstat (limited to 'kmicromail/libetpan') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libetpan/tools/mailstream_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libetpan/tools/mailstream_socket.c b/kmicromail/libetpan/tools/mailstream_socket.c
index 04a6f48..fd2c758 100644
--- a/kmicromail/libetpan/tools/mailstream_socket.c
+++ b/kmicromail/libetpan/tools/mailstream_socket.c
@@ -185,49 +185,49 @@ static ssize_t mailstream_low_socket_read(mailstream_low * s,
}
#include <stdio.h>
static ssize_t mailstream_low_socket_write(mailstream_low * s,
const void * buf, size_t count)
{
struct mailstream_socket_data * socket_data;
socket_data = (struct mailstream_socket_data *) s->data;
/* timeout */
{
fd_set fds_write;
fd_set fds_excp;
struct timeval timeout;
int r;
timeout = mailstream_network_delay;
FD_ZERO(&fds_write);
FD_SET(socket_data->fd, &fds_write);
FD_ZERO(&fds_excp);
FD_SET(socket_data->fd, &fds_excp);
// LUTZ next line blocks sometimes
if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT )
timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT;
- fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec );
+ //fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec );
r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout);
if (r < 1)
return -1;
if (FD_ISSET(socket_data->fd, &fds_excp))
return -1;
if (!FD_ISSET(socket_data->fd, &fds_write))
return 0;
}
return send(socket_data->fd,buf,count,MSG_NOSIGNAL);
//return write(socket_data->fd, buf, count);
}
/* mailstream */
mailstream * mailstream_socket_open(int fd)
{
mailstream_low * low;
mailstream * s;
low = mailstream_low_socket_open(fd);
if (low == NULL)
goto err;