Minor bugfixes in pop client code.
* libproto/pop/pop3_carrier.c (mu_pop3_set_carrier): Switch to MU_POP3_CONNECT state. * libproto/pop/pop3_disconnect.c (mu_pop3_disconnect): Check if the stream is actually open before trying to close it.
Showing
2 changed files
with
4 additions
and
1 deletions
... | @@ -42,6 +42,7 @@ mu_pop3_set_carrier (mu_pop3_t pop3, mu_stream_t carrier) | ... | @@ -42,6 +42,7 @@ mu_pop3_set_carrier (mu_pop3_t pop3, mu_stream_t carrier) |
42 | pop3->carrier = carrier; | 42 | pop3->carrier = carrier; |
43 | if (MU_POP3_FISSET (pop3, MU_POP3_TRACE)) | 43 | if (MU_POP3_FISSET (pop3, MU_POP3_TRACE)) |
44 | _mu_pop3_trace_enable (pop3); | 44 | _mu_pop3_trace_enable (pop3); |
45 | pop3->state = MU_POP3_CONNECT; | ||
45 | return 0; | 46 | return 0; |
46 | } | 47 | } |
47 | 48 | ... | ... |
... | @@ -49,5 +49,7 @@ mu_pop3_disconnect (mu_pop3_t pop3) | ... | @@ -49,5 +49,7 @@ mu_pop3_disconnect (mu_pop3_t pop3) |
49 | } | 49 | } |
50 | 50 | ||
51 | /* Close the stream. */ | 51 | /* Close the stream. */ |
52 | return mu_stream_close (pop3->carrier); | 52 | if (mu_stream_is_open (pop3->carrier)) |
53 | return mu_stream_close (pop3->carrier); | ||
54 | return 0; | ||
53 | } | 55 | } | ... | ... |
-
Please register or sign in to post a comment