[grilo] net: Always return an error on failure
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] net: Always return an error on failure
- Date: Mon, 24 Oct 2016 14:52:12 +0000 (UTC)
commit b4245447ec557f032387a1ca40922d11d0da5b11
Author: Bastien Nocera <hadess hadess net>
Date: Mon Oct 24 16:28:30 2016 +0200
net: Always return an error on failure
When getting a "Gateway timeout" error, or any other errors not handled
in the switch statement, we should make sure to return an error.
https://bugzilla.gnome.org/show_bug.cgi?id=773422
libs/net/grl-net-wc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
index a312fcc..36ae4c2 100644
--- a/libs/net/grl-net-wc.c
+++ b/libs/net/grl-net-wc.c
@@ -488,6 +488,9 @@ parse_error (guint status,
return;
default:
GRL_DEBUG ("Unhandled status: %s", soup_status_get_phrase (status));
+ g_simple_async_result_set_error (result, G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ "%s", soup_status_get_phrase (status));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]