diff options
author | Victor Toso <me@victortoso.com> | 2016-06-04 22:27:11 +0200 |
---|---|---|
committer | Victor Toso <me@victortoso.com> | 2016-06-16 14:59:09 +0200 |
commit | ea1f42338261d733a5922089e848c6acc372c010 (patch) | |
tree | 0871e2a9ff5c2297e17b48b5128111f516eb3b66 | |
parent | 1a89d35172abe0e7344f7f99f9802bfba1177a9a (diff) | |
download | grilo-ea1f42338261d733a5922089e848c6acc372c010.tar.gz |
net: use G_IO_ERROR_FAILED instead of GRL_NET_WC_ERROR_UNAVAILABLE
https://bugzilla.gnome.org/show_bug.cgi?id=764077
-rw-r--r-- | libs/net/grl-net-wc.c | 12 | ||||
-rw-r--r-- | libs/net/grl-net-wc.h | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c index c798847..96b5d1d 100644 --- a/libs/net/grl-net-wc.c +++ b/libs/net/grl-net-wc.c @@ -595,8 +595,8 @@ read_async_cb (GObject *source, G_IO_ERROR_CANCELLED, _("Operation was cancelled")); } else { - g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, - GRL_NET_WC_ERROR_UNAVAILABLE, + g_simple_async_result_set_error (result, G_IO_ERROR, + G_IO_ERROR_FAILED, _("Data not available")); } @@ -639,8 +639,8 @@ reply_cb (GObject *source, if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { g_simple_async_result_set_from_error (result, error); } else { - g_simple_async_result_set_error (result, GRL_NET_WC_ERROR, - GRL_NET_WC_ERROR_UNAVAILABLE, + g_simple_async_result_set_error (result, G_IO_ERROR, + G_IO_ERROR_FAILED, _("Data not available")); } g_error_free (error); @@ -690,8 +690,8 @@ get_url_now (GrlNetWc *self, if (!rr->request) { g_simple_async_result_set_error (G_SIMPLE_ASYNC_RESULT (result), - GRL_NET_WC_ERROR, - GRL_NET_WC_ERROR_UNAVAILABLE, + G_IO_ERROR, + G_IO_ERROR_INVALID_ARGUMENT, _("Invalid URL %s"), url); g_simple_async_result_complete (G_SIMPLE_ASYNC_RESULT (result)); diff --git a/libs/net/grl-net-wc.h b/libs/net/grl-net-wc.h index d28fb77..00866bd 100644 --- a/libs/net/grl-net-wc.h +++ b/libs/net/grl-net-wc.h @@ -33,7 +33,8 @@ G_BEGIN_DECLS /** * GrlNetWcError: - * @GRL_NET_WC_ERROR_UNAVAILABLE: TBD + * @GRL_NET_WC_ERROR_UNAVAILABLE: Deprecated. For generic errors, you + * should check for G_IO_ERROR_FAILED from G_IO_ERROR domain. * @GRL_NET_WC_ERROR_PROTOCOL_ERROR: Invalid URI or header * @GRL_NET_WC_ERROR_AUTHENTICATION_REQUIRED: Required authentication * @GRL_NET_WC_ERROR_NOT_FOUND: Request resource not found |