[gupnp] service-proxy: Unqueue finished action directly



commit 66905b4fbdfc9c1056eed5d407769e9fd9d80a0b
Author: Jens Georg <mail jensge org>
Date:   Tue Jul 6 20:01:37 2021 +0200

    service-proxy: Unqueue finished action directly
    
    If done, remove from queue. Prevents crash on shutdown
    
    Fixes #56

 libgupnp/gupnp-service-proxy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 9022344..9f4b61e 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -2117,12 +2117,12 @@ gupnp_service_proxy_call_action_finish (GUPnPServiceProxy *proxy,
 {
         g_return_val_if_fail (g_task_is_valid (G_TASK (result), proxy), NULL);
 
-        GUPnPServiceProxyAction *action =
-                g_task_propagate_pointer (G_TASK (result), error);
+        GUPnPServiceProxyAction *action = g_task_get_task_data (G_TASK (result));
+        gupnp_service_proxy_remove_action (action->proxy, action);
         g_clear_weak_pointer (&action->proxy);
         action->pending = FALSE;
 
-        return action;
+        return g_task_propagate_pointer (G_TASK (result), error);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]