Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[devmode] Fallback to "tether" device for WLAN IP address
  • Loading branch information
Thomas Perl committed May 21, 2014
1 parent e4f364c commit 8a1bceb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/developermodesettings.cpp
Expand Up @@ -44,6 +44,7 @@
#define USB_NETWORK_FALLBACK_INTERFACE "usb0"
#define USB_NETWORK_FALLBACK_IP "192.168.2.15"
#define WLAN_NETWORK_INTERFACE "wlan0"
#define WLAN_NETWORK_FALLBACK_INTERFACE "tether"

/* Developer mode package */
#define DEVELOPER_MODE_PACKAGE "jolla-developer-mode"
Expand Down Expand Up @@ -405,6 +406,15 @@ DeveloperModeSettings::refresh()
m_wlanIpAddress = ip;
emit wlanIpAddressChanged();
}
} else if (entries.contains(WLAN_NETWORK_FALLBACK_INTERFACE)) {
// If the WLAN network interface does not have an IP address,
// but there is a "tether" interface that does have an IP, assume
// it is the WLAN interface in tethering mode, and use its IP.
QString ip = entries[WLAN_NETWORK_FALLBACK_INTERFACE];
if (m_wlanIpAddress != ip) {
m_wlanIpAddress = ip;
emit wlanIpAddressChanged();
}
}

foreach (const QString &device, entries.keys()) {
Expand Down

0 comments on commit 8a1bceb

Please sign in to comment.