projects
/
profile
/
ivi
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b9a4a6
)
Reset GWebResult buffer and length in case of an error
author
Marcel Holtmann
<marcel@holtmann.org>
Sat, 30 Oct 2010 23:03:37 +0000
(
01:03
+0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Sat, 30 Oct 2010 23:03:37 +0000
(
01:03
+0200)
gweb/gweb.c
patch
|
blob
|
history
diff --git
a/gweb/gweb.c
b/gweb/gweb.c
index
bfeecc8
..
bdf90da
100644
(file)
--- 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;
}