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
408d5f84
...
408d5f84a35acbfb7efc7cde25bb48a6eee7f91b
authored
2001-03-21 03:47:54 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
return an erro if the servers goes away suddenly.
1 parent
0ef1f36c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletions
mailbox/folder_imap.c
mailbox/mbx_pop.c
mailbox/smtp.c
mailbox/folder_imap.c
View file @
408d5f8
...
...
@@ -1562,6 +1562,11 @@ imap_readline (f_imap_t f_imap)
if
(
status
!=
0
)
return
status
;
/* The server went away: It maybe a timeout and some imap server
does not send the BYE. Consider like an error. */
if
(
n
==
0
)
return
EIO
;
total
+=
n
;
f_imap
->
offset
+=
n
;
f_imap
->
nl
=
memchr
(
f_imap
->
buffer
,
'\n'
,
total
);
...
...
mailbox/mbx_pop.c
View file @
408d5f8
...
...
@@ -538,7 +538,12 @@ pop_open (mailbox_t mbox, int flags)
url_get_auth
(
mbox
->
url
,
auth
,
sizeof
(
auth
),
&
n
);
if
(
n
==
0
||
strcasecmp
(
auth
,
"*"
)
==
0
)
{
authority_create
(
&
(
mbox
->
authority
),
mbox
->
ticket
,
mbox
);
ticket_t
ticket
=
NULL
;
if
(
mbox
->
folder
)
folder_get_ticket
(
mbox
->
folder
,
&
ticket
);
if
(
ticket
==
NULL
)
ticket
=
mbox
->
ticket
;
authority_create
(
&
(
mbox
->
authority
),
ticket
,
mbox
);
authority_set_authenticate
(
mbox
->
authority
,
pop_user
,
mbox
);
}
else
if
(
strcasecmp
(
auth
,
"+apop"
)
==
0
)
...
...
@@ -1815,6 +1820,11 @@ pop_readline (pop_data_t mpd)
if
(
status
!=
0
)
return
status
;
/* The server went away: It maybe a timeout and some pop server
does not send the -ERR. Consider this like an error. */
if
(
n
==
0
)
return
EIO
;
total
+=
n
;
mpd
->
offset
+=
n
;
mpd
->
nl
=
memchr
(
mpd
->
buffer
,
'\n'
,
total
);
...
...
mailbox/smtp.c
View file @
408d5f8
...
...
@@ -822,6 +822,10 @@ smtp_readline (smtp_t smtp)
if
(
status
!=
0
)
return
status
;
/* Server went away, consider this like an error. */
if
(
n
==
0
)
return
EIO
;
total
+=
n
;
smtp
->
nl
=
memchr
(
smtp
->
buffer
,
'\n'
,
total
);
if
(
smtp
->
nl
==
NULL
)
/* Do we have a full line. */
...
...
Please
register
or
sign in
to post a comment