aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-09-26 09:53:05 +0200
committerAleksander Morgado <aleksander@aleksander.es>2017-09-26 10:03:17 +0200
commit1e318bec54da3f37901eadb2a04a4520737eb9a0 (patch)
tree86e5b7bf2b4bef0b039336697a288923925ac741
parent9f9c88a72a848603e8898f8faaf48497aa545525 (diff)
broadband-bearer: fix object types in connect_3gpp() steps
All the steps in the connect_3gpp() sequence are implemented as methods in the MMBroadbandBearer class, and therefore the objects received in the corresponding ready() methods are all bearers, not modems. This issue wasn't found before because the objects received were not really being used after all, as we were relying on the ones kept in the context or lately in the GTask itself.
-rw-r--r--src/mm-broadband-bearer.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index 5dd34f62..0a0d235e 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -960,17 +960,15 @@ cid_selection_3gpp (MMBroadbandBearer *self,
*/
static void
-get_ip_config_3gpp_ready (MMBroadbandModem *modem,
- GAsyncResult *res,
- GTask *task)
+get_ip_config_3gpp_ready (MMBroadbandBearer *self,
+ GAsyncResult *res,
+ GTask *task)
{
- MMBroadbandBearer *self;
DetailedConnectContext *ctx;
MMBearerIpConfig *ipv4_config = NULL;
MMBearerIpConfig *ipv6_config = NULL;
GError *error = NULL;
- self = g_task_get_source_object (task);
ctx = g_task_get_task_data (task);
if (!MM_BROADBAND_BEARER_GET_CLASS (self)->get_ip_config_3gpp_finish (self,
@@ -1000,18 +998,16 @@ get_ip_config_3gpp_ready (MMBroadbandModem *modem,
}
static void
-dial_3gpp_ready (MMBroadbandModem *modem,
- GAsyncResult *res,
- GTask *task)
+dial_3gpp_ready (MMBroadbandBearer *self,
+ GAsyncResult *res,
+ GTask *task)
{
- MMBroadbandBearer *self;
DetailedConnectContext *ctx;
MMBearerIpMethod ip_method = MM_BEARER_IP_METHOD_UNKNOWN;
MMBearerIpConfig *ipv4_config = NULL;
MMBearerIpConfig *ipv6_config = NULL;
GError *error = NULL;
- self = g_task_get_source_object (task);
ctx = g_task_get_task_data (task);
ctx->data = MM_BROADBAND_BEARER_GET_CLASS (self)->dial_3gpp_finish (self, res, &error);
@@ -1079,15 +1075,13 @@ dial_3gpp_ready (MMBroadbandModem *modem,
}
static void
-cid_selection_3gpp_ready (MMBroadbandModem *modem,
- GAsyncResult *res,
- GTask *task)
+cid_selection_3gpp_ready (MMBroadbandBearer *self,
+ GAsyncResult *res,
+ GTask *task)
{
- MMBroadbandBearer *self;
DetailedConnectContext *ctx;
GError *error = NULL;
- self = g_task_get_source_object (task);
ctx = g_task_get_task_data (task);
/* Keep CID around after initializing the PDP context in order to