(pop3d_setio): Make sure both streams are line-buffered.
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -138,6 +138,8 @@ pop3d_setio (FILE *in, FILE *out) | ... | @@ -138,6 +138,8 @@ pop3d_setio (FILE *in, FILE *out) |
138 | if (!in || !out) | 138 | if (!in || !out) |
139 | pop3d_abquit (ERR_NO_OFILE); | 139 | pop3d_abquit (ERR_NO_OFILE); |
140 | 140 | ||
141 | setvbuf (in, NULL, _IOLBF, 0); | ||
142 | setvbuf (out, NULL, _IOLBF, 0); | ||
141 | if (stdio_stream_create (&istream, in, MU_STREAM_NO_CLOSE) | 143 | if (stdio_stream_create (&istream, in, MU_STREAM_NO_CLOSE) |
142 | || stdio_stream_create (&ostream, out, MU_STREAM_NO_CLOSE)) | 144 | || stdio_stream_create (&ostream, out, MU_STREAM_NO_CLOSE)) |
143 | pop3d_abquit (ERR_NO_OFILE); | 145 | pop3d_abquit (ERR_NO_OFILE); | ... | ... |
-
Please register or sign in to post a comment