summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-28 18:39:07 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-28 18:39:07 +0200
commit466d2496479a4391952866e4cada00be80d7e426 (patch)
tree00c786eee86bbcfc7cd61836363f6f79b9c4f25d /network
parente38e9ce609c5aae7404b71f14cc76492c3f2c2c8 (diff)
network/http-launch: Fix writing response if the write could not be finished in one rurun
Diffstat (limited to 'network')
-rw-r--r--network/http-launch/http-launch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/network/http-launch/http-launch.c b/network/http-launch/http-launch.c
index 7b02890..13341d9 100644
--- a/network/http-launch/http-launch.c
+++ b/network/http-launch/http-launch.c
@@ -76,8 +76,10 @@ write_bytes (Client * client, const gchar * data, guint len)
/* TODO: We assume this never blocks */
do {
w = g_output_stream_write (client->ostream, data, len, NULL, &err);
- if (w > 0)
+ if (w > 0) {
len -= w;
+ data += w;
+ }
} while (w > 0 && len > 0);
if (w <= 0) {