-rw-r--r-- | kmicromail/libetpan/tools/mailstream_socket.c | 2 |
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 | |||
@@ -197,25 +197,25 @@ static ssize_t mailstream_low_socket_write(mailstream_low * s, | |||
197 | struct timeval timeout; | 197 | struct timeval timeout; |
198 | int r; | 198 | int r; |
199 | 199 | ||
200 | timeout = mailstream_network_delay; | 200 | timeout = mailstream_network_delay; |
201 | 201 | ||
202 | FD_ZERO(&fds_write); | 202 | FD_ZERO(&fds_write); |
203 | FD_SET(socket_data->fd, &fds_write); | 203 | FD_SET(socket_data->fd, &fds_write); |
204 | FD_ZERO(&fds_excp); | 204 | FD_ZERO(&fds_excp); |
205 | FD_SET(socket_data->fd, &fds_excp); | 205 | FD_SET(socket_data->fd, &fds_excp); |
206 | // LUTZ next line blocks sometimes | 206 | // LUTZ next line blocks sometimes |
207 | if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT ) | 207 | if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT ) |
208 | timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT; | 208 | timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT; |
209 | fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec ); | 209 | //fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec ); |
210 | r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout); | 210 | r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout); |
211 | if (r < 1) | 211 | if (r < 1) |
212 | return -1; | 212 | return -1; |
213 | if (FD_ISSET(socket_data->fd, &fds_excp)) | 213 | if (FD_ISSET(socket_data->fd, &fds_excp)) |
214 | return -1; | 214 | return -1; |
215 | if (!FD_ISSET(socket_data->fd, &fds_write)) | 215 | if (!FD_ISSET(socket_data->fd, &fds_write)) |
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | return send(socket_data->fd,buf,count,MSG_NOSIGNAL); | 219 | return send(socket_data->fd,buf,count,MSG_NOSIGNAL); |
220 | //return write(socket_data->fd, buf, count); | 220 | //return write(socket_data->fd, buf, count); |
221 | } | 221 | } |