[gupnp] control-point: Hold a ref on control point while async downloading
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] control-point: Hold a ref on control point while async downloading
- Date: Mon, 24 May 2021 08:17:48 +0000 (UTC)
commit 4a68246fe21df78bd1c3a0460d2d1eaaaf5747f7
Author: Doug Nazar <nazard nazar ca>
Date: Fri May 7 04:24:05 2021 -0400
control-point: Hold a ref on control point while async downloading
The control point otherwise may disappear out from under soup while
it's downloading.
libgupnp/gupnp-control-point.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libgupnp/gupnp-control-point.c b/libgupnp/gupnp-control-point.c
index 44f20a2..627cfca 100644
--- a/libgupnp/gupnp-control-point.c
+++ b/libgupnp/gupnp-control-point.c
@@ -115,6 +115,7 @@ get_description_url_data_free (GetDescriptionURLData *data)
g_free (data->udn);
g_free (data->service_type);
g_free (data->description_url);
+ g_object_unref (data->control_point);
g_slice_free (GetDescriptionURLData, data);
}
@@ -736,7 +737,7 @@ load_description (GUPnPControlPoint *control_point,
http_request_set_accept_language (data->message);
- data->control_point = control_point;
+ data->control_point = g_object_ref (control_point);
data->udn = g_strdup (udn);
data->service_type = g_strdup (service_type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]