[gupnp] Call action callback through idle on error
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] Call action callback through idle on error
- Date: Wed, 16 Oct 2013 13:07:55 +0000 (UTC)
commit e914903d6d29043875f3bf24a6e2642629f79bbd
Author: Jens Georg <mail jensge org>
Date: Sun Aug 18 12:09:32 2013 +0200
Call action callback through idle on error
https://bugzilla.gnome.org/show_bug.cgi?id=669729
libgupnp/gupnp-service-proxy.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 10da9ac..4991707 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -970,6 +970,16 @@ write_in_parameter (const char *arg_name,
xml_util_end_element (msg_str, arg_name);
}
+static gboolean
+action_error_idle_cb (gpointer user_data)
+{
+ GUPnPServiceProxyAction *action = (GUPnPServiceProxyAction *) user_data;
+
+ action->callback (action->proxy, action, action->user_data);
+
+ return FALSE;
+}
+
/**
* gupnp_service_proxy_begin_action_valist:
* @proxy: A #GUPnPServiceProxy
@@ -1057,7 +1067,7 @@ gupnp_service_proxy_begin_action_list
ret = begin_action_msg (proxy, action, callback, user_data);
if (ret->error) {
- callback (proxy, ret, user_data);
+ g_idle_add (action_error_idle_cb, ret);
return ret;
}
@@ -1115,7 +1125,7 @@ gupnp_service_proxy_begin_action_hash
ret = begin_action_msg (proxy, action, callback, user_data);
if (ret->error) {
- callback (proxy, ret, user_data);
+ g_idle_add (action_error_idle_cb, ret);
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]