From d307a8b06167465532f8f6eb8dbf45933d471058 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 23 Jul 2014 14:32:32 -0500 Subject: [PATCH] wwan: allow using the default subscription APN (bgo #729665) If no APN is specified, passing "" to ModemManager indicates that the connection should use the default subscription APN, which the modem and the network determine themselves. This doesn't work with all modems and operators, but in that case the user can specify the APN. --- src/devices/wwan/nm-modem-broadband.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 22ddaed0ba..5dd315ea37 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -280,9 +280,9 @@ create_gsm_connect_properties (NMModem *modem, if (str) mm_simple_connect_properties_set_number (properties, str); + /* Blank APN ("") means the default subscription APN */ str = nm_setting_gsm_get_apn (setting); - if (str) - mm_simple_connect_properties_set_apn (properties, str); + mm_simple_connect_properties_set_apn (properties, str ? str : ""); str = nm_setting_gsm_get_network_id (setting); if (str)