[gupnp/gupnp-1.0] 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/gupnp-1.0] control-point: Hold a ref on control point while async downloading
- Date: Mon, 24 May 2021 08:45:01 +0000 (UTC)
commit 3ee72f4f6dd19239a9c4d186d9c7f5207bcfde57
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 81db087..cc7c633 100644
--- a/libgupnp/gupnp-control-point.c
+++ b/libgupnp/gupnp-control-point.c
@@ -112,6 +112,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);
}
@@ -714,7 +715,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]