pmaports/temp/modemmanager/0014-iface-modem-3gpp-use-g_autoptr-for-the-MMBearerPrope.patch

44 lines
1.6 KiB
Diff

From fa6b6f69d4a2646e6695722372d9aa6b3d327151 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado <aleksander@aleksander.es>
Date: Sun, 23 May 2021 14:14:27 +0200
Subject: [PATCH 14/39] iface-modem-3gpp: use g_autoptr() for the
MMBearerProperties during sync
---
src/mm-iface-modem-3gpp.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index c435da87..c6db5e4f 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -2370,20 +2370,18 @@ sync_eps_bearer_ready (MMIfaceModem3gpp *self,
GAsyncResult *res,
GTask *task)
{
- MMBearerProperties *properties;
- SyncingContext *ctx;
- g_autoptr (GError) error = NULL;
+ SyncingContext *ctx;
+ g_autoptr(MMBearerProperties) properties = NULL;
+ g_autoptr(GError) error = NULL;
mm_obj_dbg (self, "EPS bearer sync ready");
ctx = g_task_get_task_data (task);
properties = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish (self, res, &error);
- if (!properties) {
- mm_obj_dbg (self, "couldn't refresh EPS bearer properties: %s", error->message);
- } else {
+ if (!properties)
+ mm_obj_dbg (self, "couldn't refresh initial EPS bearer status: %s", error->message);
+ else
mm_iface_modem_3gpp_update_initial_eps_bearer (self, properties);
- g_object_unref (properties);
- }
/* Go on to next step */
ctx->step++;
--
2.31.1