Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
backport socket write fix
  • Loading branch information
pjstevns committed May 31, 2013
1 parent 9b49bff commit b9cf131
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/clientbase.c
Expand Up @@ -307,7 +307,7 @@ int ci_write(ClientBase_T *self, char * msg, ...)
if (self->ssl && self->ssl_state)
event_add(self->wev, NULL);
}
return e;
return 0;
} else {
TRACE(TRACE_INFO, "[%p] S > [%ld/%ld:%s]", self, t, self->write_buffer->len, s);

Expand Down
3 changes: 2 additions & 1 deletion src/imap4.c
Expand Up @@ -283,7 +283,8 @@ static void imap_handle_exit(ImapSession *session, int status)
if (session->buff && session->buff->len > 0) {
int e = 0;
if ((e = ci_write(session->ci, session->buff->str)) < 0) {
TRACE(TRACE_DEBUG,"ci_write returned error [%s]", strerror(e));
int serr = errno;
TRACE(TRACE_DEBUG,"ci_write returned error [%s]", strerror(serr));
dbmail_imap_session_set_state(session,CLIENTSTATE_ERROR);
return;
}
Expand Down

0 comments on commit b9cf131

Please sign in to comment.