committed the right file now.
Showing
1 changed file
with
6 additions
and
5 deletions
... | @@ -24,6 +24,7 @@ | ... | @@ -24,6 +24,7 @@ |
24 | #include <string.h> | 24 | #include <string.h> |
25 | #include <sys/types.h> | 25 | #include <sys/types.h> |
26 | #include <unistd.h> | 26 | #include <unistd.h> |
27 | #include <errno.h> | ||
27 | #include <mailutils/sys/pop3.h> | 28 | #include <mailutils/sys/pop3.h> |
28 | #include <mailutils/error.h> | 29 | #include <mailutils/error.h> |
29 | 30 | ||
... | @@ -40,12 +41,12 @@ mu_pop3_carrier_is_read_ready(stream_t carrier, int timeout) | ... | @@ -40,12 +41,12 @@ mu_pop3_carrier_is_read_ready(stream_t carrier, int timeout) |
40 | fd_set fset; | 41 | fd_set fset; |
41 | 42 | ||
42 | FD_ZERO (&fset); | 43 | FD_ZERO (&fset); |
43 | FD_SET (fds->fd, &fset); | 44 | FD_SET (fd, &fset); |
44 | 45 | ||
45 | tv.tv_sec = timeout / 100; | 46 | tv.tv_sec = timeout / 100; |
46 | tv.tv_usec = (timeout % 1000) * 1000; | 47 | tv.tv_usec = (timeout % 1000) * 1000; |
47 | 48 | ||
48 | ready = select (fds->fd + 1, &fset, NULL, NULL, (timeout == -1) ? NULL: &tv); | 49 | ready = select (fd + 1, &fset, NULL, NULL, (timeout == -1) ? NULL: &tv); |
49 | ready = (ready == -1) ? 0 : 1; | 50 | ready = (ready == -1) ? 0 : 1; |
50 | } | 51 | } |
51 | return ready; | 52 | return ready; |
... | @@ -55,7 +56,7 @@ mu_pop3_carrier_is_read_ready(stream_t carrier, int timeout) | ... | @@ -55,7 +56,7 @@ mu_pop3_carrier_is_read_ready(stream_t carrier, int timeout) |
55 | the stuff byte termination octet ".", put a null in the buffer | 56 | the stuff byte termination octet ".", put a null in the buffer |
56 | when done. And Do a select() (stream_is_readready()) for the timeout. */ | 57 | when done. And Do a select() (stream_is_readready()) for the timeout. */ |
57 | static int | 58 | static int |
58 | mu_pop3_getline (pop3_t pop3) | 59 | mu_pop3_getline (mu_pop3_t pop3) |
59 | { | 60 | { |
60 | size_t n = 0; | 61 | size_t n = 0; |
61 | size_t total = pop3->io.ptr - pop3->io.buf; | 62 | size_t total = pop3->io.ptr - pop3->io.buf; |
... | @@ -138,7 +139,7 @@ mu_pop3_getline (pop3_t pop3) | ... | @@ -138,7 +139,7 @@ mu_pop3_getline (pop3_t pop3) |
138 | with a buffer != NULL. | 139 | with a buffer != NULL. |
139 | */ | 140 | */ |
140 | int | 141 | int |
141 | mu_pop3_readline (pop3_t pop3, char *buffer, size_t buflen, size_t *pnread) | 142 | mu_pop3_readline (mu_pop3_t pop3, char *buffer, size_t buflen, size_t *pnread) |
142 | { | 143 | { |
143 | size_t nread = 0; | 144 | size_t nread = 0; |
144 | size_t n = 0; | 145 | size_t n = 0; |
... | @@ -147,7 +148,7 @@ mu_pop3_readline (pop3_t pop3, char *buffer, size_t buflen, size_t *pnread) | ... | @@ -147,7 +148,7 @@ mu_pop3_readline (pop3_t pop3, char *buffer, size_t buflen, size_t *pnread) |
147 | /* Do we need to fill up? Yes if no NL or the buffer is empty. */ | 148 | /* Do we need to fill up? Yes if no NL or the buffer is empty. */ |
148 | if (pop3->carrier && (pop3->io.nl == NULL || pop3->io.ptr == pop3->io.buf)) | 149 | if (pop3->carrier && (pop3->io.nl == NULL || pop3->io.ptr == pop3->io.buf)) |
149 | { | 150 | { |
150 | status = pop3_getline (pop3); | 151 | status = mu_pop3_getline (pop3); |
151 | if (status != 0) | 152 | if (status != 0) |
152 | return status; | 153 | return status; |
153 | } | 154 | } | ... | ... |
-
Please register or sign in to post a comment