diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-30 15:35:19 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-30 15:35:19 +0200 |
commit | 763719bda519db29d22f2145b2276d54e6edb3c4 (patch) | |
tree | 9f6ebefcafaa3f480763d197d264e1c3e2122337 /gweb/gweb.c | |
parent | 561574a7003487c8a57cfcbe9124ecc789590a3f (diff) | |
download | connman-763719bda519db29d22f2145b2276d54e6edb3c4.tar.gz connman-763719bda519db29d22f2145b2276d54e6edb3c4.tar.bz2 connman-763719bda519db29d22f2145b2276d54e6edb3c4.zip |
Fix handling of receive watch callback within GWeb
Diffstat (limited to 'gweb/gweb.c')
-rw-r--r-- | gweb/gweb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c index 48aa24d1..3bd26245 100644 --- a/gweb/gweb.c +++ b/gweb/gweb.c @@ -220,7 +220,7 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond, debug(session->web, "status %u bytes read %zu", status, bytes_read); - if (bytes_read == 0) { + if (status != G_IO_STATUS_NORMAL) { session->transport_watch = 0; if (session->result_func != NULL) session->result_func(200, NULL, session->result_data); @@ -266,8 +266,8 @@ static int connect_session_transport(struct web_session *session) g_io_channel_set_close_on_unref(session->transport_channel, TRUE); session->transport_watch = g_io_add_watch(session->transport_channel, - G_IO_IN, received_data, - session); + G_IO_IN | G_IO_HUP | G_IO_NVAL | G_IO_ERR, + received_data, session); return 0; } |