...
372 setting = nm_connection_get_setting_by_name (connection, connection_type);
373
// We need to add this section as we do not check for bluetooth ( which can hold either gsm or cdma settings
374 if (NM_IS_SETTING_BLUETOOTH(setting)) {
375 /* wrong connection type, try to get gsm connection settings */
376 setting = nm_connection_get_setting_by_name(connection, NM_SETTING_GSM_SETTING_NAME);
377 if (!setting) {
378 setting = nm_connection_get_setting_by_name(connection, NM_SETTING_CDMA_SETTING_NAME);
379 }
380 }
381
382 if (!setting) {
383 g_set_error_literal (error, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR_UNKOWN,
384 "Missing type-specific setting; no secrets could be found.");
385 return FALSE;
386 }
387
DUN via bluetooth fails
from
$ cat /etc/NetworkMan ager/system- connection/ example 92fb-4297- 8db4-875b66b331 9a
[connection]
id=Mobil-BT connection
uuid=c57749ea-
type=bluetooth
autoconnect=false
[bluetooth] 00:16:4E: 24:EA:2F
bdaddr=
type=dun
[gsm] userexample
number=*99#
apn=apn.example.com
username=
password=secret
pin=1234
[serial]
baud=115200
------- ------- ------- ------- ----
351 details_ from_connection (NMConnection *connection,
352 static gboolean
353 extract_
354 const char **username,
355 const char **password,
356 GError **error)
357 {
... get_setting_ by_name (connection, connection_type);
372 setting = nm_connection_
373
// We need to add this section as we do not check for bluetooth ( which can hold either gsm or cdma settings
374 if (NM_IS_ SETTING_ BLUETOOTH( setting) ) { get_setting_ by_name( connection, NM_SETTING_ GSM_SETTING_ NAME); get_setting_ by_name( connection, NM_SETTING_ CDMA_SETTING_ NAME); MANAGER_ ERROR, NM_PPP_ MANAGER_ ERROR_UNKOWN,
375 /* wrong connection type, try to get gsm connection settings */
376 setting = nm_connection_
377 if (!setting) {
378 setting = nm_connection_
379 }
380 }
381
382 if (!setting) {
383 g_set_error_literal (error, NM_PPP_
384 "Missing type-specific setting; no secrets could be found.");
385 return FALSE;
386 }
387
// regular code gsm_get_ username (NM_SETTING_GSM (setting)); gsm_get_ password (NM_SETTING_GSM (setting)); cdma_get_ username (NM_SETTING_CDMA (setting)); cdma_get_ password (NM_SETTING_CDMA (setting));
...
395 } else if (NM_IS_SETTING_GSM (setting)) {
396 *username = nm_setting_
397 *password = nm_setting_
398 } else if (NM_IS_SETTING_CDMA (setting)) {
399 *username = nm_setting_
400 *password = nm_setting_