Commit 150ebcfa 150ebcfaf5ded43ff71313ce2acff79bf99c1487 by Sergey Poznyakoff

Use full buffering for streamrefs.

* libmailutils/stream/streamref.c (mu_streamref_create_abridged): Set
full buffering by default.
1 parent 1d5c1ef0
...@@ -266,7 +266,7 @@ mu_streamref_create_abridged (mu_stream_t *pref, mu_stream_t str, ...@@ -266,7 +266,7 @@ mu_streamref_create_abridged (mu_stream_t *pref, mu_stream_t str,
266 mu_off_t off; 266 mu_off_t off;
267 int flags; 267 int flags;
268 struct _mu_streamref *sp; 268 struct _mu_streamref *sp;
269 269
270 rc = mu_stream_seek (str, 0, MU_SEEK_SET, &off); 270 rc = mu_stream_seek (str, 0, MU_SEEK_SET, &off);
271 if (rc) 271 if (rc)
272 return rc; 272 return rc;
...@@ -302,6 +302,9 @@ mu_streamref_create_abridged (mu_stream_t *pref, mu_stream_t str, ...@@ -302,6 +302,9 @@ mu_streamref_create_abridged (mu_stream_t *pref, mu_stream_t str,
302 off = start; 302 off = start;
303 sp->offset = off; 303 sp->offset = off;
304 *pref = (mu_stream_t) sp; 304 *pref = (mu_stream_t) sp;
305
306 mu_stream_set_buffer (*pref, mu_buffer_full, 0);
307
305 return 0; 308 return 0;
306 } 309 }
307 310
......