network/http-launch: Fix writing response if the write could not be finished in one rurun

This commit is contained in:
Sebastian Dröge 2013-07-28 18:39:07 +02:00
parent e38e9ce609
commit 466d249647

View file

@ -76,8 +76,10 @@ write_bytes (Client * client, const gchar * data, guint len)
/* TODO: We assume this never blocks */ /* TODO: We assume this never blocks */
do { do {
w = g_output_stream_write (client->ostream, data, len, NULL, &err); w = g_output_stream_write (client->ostream, data, len, NULL, &err);
if (w > 0) if (w > 0) {
len -= w; len -= w;
data += w;
}
} while (w > 0 && len > 0); } while (w > 0 && len > 0);
if (w <= 0) { if (w <= 0) {