Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
67d96f51
...
67d96f510c40ca1ca278f84cb79438a45cc8bdf2
authored
2003-10-06 03:50:04 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
committed the right file now.
1 parent
f990c94a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
mailbox/pop/pop3_readline.c
mailbox/pop/pop3_readline.c
View file @
67d96f5
...
...
@@ -24,6 +24,7 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <mailutils/sys/pop3.h>
#include <mailutils/error.h>
...
...
@@ -40,12 +41,12 @@ mu_pop3_carrier_is_read_ready(stream_t carrier, int timeout)
fd_set
fset
;
FD_ZERO
(
&
fset
);
FD_SET
(
fd
s
->
fd
,
&
fset
);
FD_SET
(
fd
,
&
fset
);
tv
.
tv_sec
=
timeout
/
100
;
tv
.
tv_usec
=
(
timeout
%
1000
)
*
1000
;
ready
=
select
(
fd
s
->
fd
+
1
,
&
fset
,
NULL
,
NULL
,
(
timeout
==
-
1
)
?
NULL
:
&
tv
);
ready
=
select
(
fd
+
1
,
&
fset
,
NULL
,
NULL
,
(
timeout
==
-
1
)
?
NULL
:
&
tv
);
ready
=
(
ready
==
-
1
)
?
0
:
1
;
}
return
ready
;
...
...
@@ -55,7 +56,7 @@ mu_pop3_carrier_is_read_ready(stream_t carrier, int timeout)
the stuff byte termination octet ".", put a null in the buffer
when done. And Do a select() (stream_is_readready()) for the timeout. */
static
int
mu_pop3_getline
(
pop3_t
pop3
)
mu_pop3_getline
(
mu_
pop3_t
pop3
)
{
size_t
n
=
0
;
size_t
total
=
pop3
->
io
.
ptr
-
pop3
->
io
.
buf
;
...
...
@@ -138,7 +139,7 @@ mu_pop3_getline (pop3_t pop3)
with a buffer != NULL.
*/
int
mu_pop3_readline
(
pop3_t
pop3
,
char
*
buffer
,
size_t
buflen
,
size_t
*
pnread
)
mu_pop3_readline
(
mu_
pop3_t
pop3
,
char
*
buffer
,
size_t
buflen
,
size_t
*
pnread
)
{
size_t
nread
=
0
;
size_t
n
=
0
;
...
...
@@ -147,7 +148,7 @@ mu_pop3_readline (pop3_t pop3, char *buffer, size_t buflen, size_t *pnread)
/* Do we need to fill up? Yes if no NL or the buffer is empty. */
if
(
pop3
->
carrier
&&
(
pop3
->
io
.
nl
==
NULL
||
pop3
->
io
.
ptr
==
pop3
->
io
.
buf
))
{
status
=
pop3_getline
(
pop3
);
status
=
mu_
pop3_getline
(
pop3
);
if
(
status
!=
0
)
return
status
;
}
...
...
Please
register
or
sign in
to post a comment