[gupnp] ServiceProxy: Drop additional reference on message
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] ServiceProxy: Drop additional reference on message
- Date: Wed, 5 Jan 2022 16:14:25 +0000 (UTC)
commit fa5b8ad8da45a9c3bebc7f6a81ad02f7ef021e81
Author: Jens Georg <mail jensge org>
Date: Wed Jan 5 17:12:37 2022 +0100
ServiceProxy: Drop additional reference on message
This was necessary for the old libsoup API, it took ownership of the
message. The new API does not need it.
libgupnp/gupnp-service-proxy-action.c | 1 +
libgupnp/gupnp-service-proxy.c | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy-action.c b/libgupnp/gupnp-service-proxy-action.c
index 464f74a..31788b6 100644
--- a/libgupnp/gupnp-service-proxy-action.c
+++ b/libgupnp/gupnp-service-proxy-action.c
@@ -247,6 +247,7 @@ action_dispose (GUPnPServiceProxyAction *action)
g_clear_object (&action->cancellable);
g_clear_error (&action->error);
g_clear_object (&action->msg);
+
if (action->msg_str != NULL) {
g_string_free (action->msg_str, TRUE);
action->msg_str = NULL;
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index ea672e9..ea9a55a 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -813,10 +813,6 @@ gupnp_service_proxy_action_queue_task (GTask *task)
SoupSession *session;
GUPnPServiceProxyAction *action = g_task_get_task_data (task);
- /* We need to keep our own reference to the message as well,
- * in order for send_action() to work. */
- g_object_ref (action->msg);
-
/* Send the message */
context = gupnp_service_info_get_context
(GUPNP_SERVICE_INFO (action->proxy));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]