summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-31 01:03:37 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-31 01:03:37 +0200
commit38156cef9ee7dd8f704919468028202373c40e72 (patch)
tree04aae6afd8a927e0eaf43b39e649f9ecdc76c832 /gweb
parent3b9a4a65e4850a01713324634fa7ccd064322508 (diff)
downloadconnman-38156cef9ee7dd8f704919468028202373c40e72.tar.gz
connman-38156cef9ee7dd8f704919468028202373c40e72.tar.bz2
connman-38156cef9ee7dd8f704919468028202373c40e72.zip
Reset GWebResult buffer and length in case of an error
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gweb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c
index bfeecc87..bdf90da8 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -316,6 +316,8 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
if (cond & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) {
session->transport_watch = 0;
+ session->result.buffer = NULL;
+ session->result.length = 0;
call_result_func(session, 400);
return FALSE;
}
@@ -327,6 +329,8 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
if (status != G_IO_STATUS_NORMAL) {
session->transport_watch = 0;
+ session->result.buffer = NULL;
+ session->result.length = 0;
call_result_func(session, 200);
return FALSE;
}