diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-11-23 22:53:59 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-01-04 14:11:17 +0100 |
commit | ef50c085f9a96db3297de982e24015e574b3b0e6 (patch) | |
tree | 1aff130644cea565aa6b4f60af23d9bd523cd77b /plugins | |
parent | 1ffcb163493edf82bc7102b028450fca40b4dddd (diff) |
base-modem,cinterion: no need for a peek_current_data_port() method
We already get the data port given as input parameter in
disconnect_3gpp(), so there is no point in trying to find out which the
data port is.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/cinterion/mm-broadband-bearer-cinterion.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/plugins/cinterion/mm-broadband-bearer-cinterion.c b/plugins/cinterion/mm-broadband-bearer-cinterion.c index df883197..5c9912d3 100644 --- a/plugins/cinterion/mm-broadband-bearer-cinterion.c +++ b/plugins/cinterion/mm-broadband-bearer-cinterion.c @@ -781,24 +781,9 @@ disconnect_3gpp (MMBroadbandBearer *self, gpointer user_data) { Disconnect3gppContext *ctx; - MMPort *port; g_assert (primary != NULL); - - /* Note: Not sure how else to get active data port? Can this be done without adding this - * function to mm-base-modem.c? - * TODO: Dual SIM how do we know which interface to grab/disconnect if two are active? */ - /* Get the Net port to be torn down */ - port = mm_base_modem_peek_current_data_port (MM_BASE_MODEM (modem), MM_PORT_TYPE_NET); - if (!port) { - g_simple_async_report_error_in_idle (G_OBJECT (self), - callback, - user_data, - MM_CORE_ERROR, - MM_CORE_ERROR_NOT_FOUND, - "No valid data port found to tear down."); - return; - } + g_assert (data != NULL); /* Setup connection context */ ctx = g_slice_new0 (Disconnect3gppContext); @@ -808,7 +793,7 @@ disconnect_3gpp (MMBroadbandBearer *self, callback, user_data, disconnect_3gpp); - ctx->data = g_object_ref (port); + ctx->data = g_object_ref (data); ctx->primary = g_object_ref (primary); /* Maps Bearer->Net Interface-> PDP Context |