summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2022-09-16 23:13:01 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2022-09-16 23:13:47 +0900
commit78968dd624e95b9e5f8280464c2613e0e920d8cf (patch)
tree7e0e61a1956460d4029961642d775a38731b2922
parent4202b38f6d169cfd49eeb906593dcbd9b159fd67 (diff)
downloadconnman-78968dd624e95b9e5f8280464c2613e0e920d8cf.tar.gz
connman-78968dd624e95b9e5f8280464c2613e0e920d8cf.tar.bz2
connman-78968dd624e95b9e5f8280464c2613e0e920d8cf.zip
Change-Id: I8ec97355b5ebf673d792339a7d0a2911392d6a89 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rwxr-xr-xplugins/wifi.c8
-rw-r--r--src/dhcp.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 90d4b8fb..7a8eccce 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -3989,7 +3989,7 @@ static void disconnect_callback(int result, GSupplicantInterface *interface,
struct connman_network *network = dd->network;
#if defined TIZEN_EXT
GList *list;
- struct wifi_data *wifi;
+ struct wifi_data *wifi = NULL;
g_free(dd);
DBG("network %p result %d", network, result);
@@ -4004,7 +4004,7 @@ static void disconnect_callback(int result, GSupplicantInterface *interface,
goto found;
}
- if (network == wifi->pending_network)
+ if (wifi && network == wifi->pending_network)
wifi->pending_network = NULL;
/* wifi_data may be invalid because wifi is already disabled */
@@ -4198,7 +4198,7 @@ static void signalpoll_callback(int result, int maxspeed, int strength,
struct connman_device *device;
struct connman_network *network = user_data;
GSupplicantNetwork *supplicant_network;
- struct wifi_data *wifi;
+ struct wifi_data *wifi = NULL;
uint16_t freq = connman_network_get_frequency(network);
const char *group = connman_network_get_group(network);
@@ -4212,7 +4212,7 @@ static void signalpoll_callback(int result, int maxspeed, int strength,
if (device)
wifi = connman_device_get_data(device);
- if (group) {
+ if (group && wifi) {
supplicant_network = g_supplicant_interface_get_network(wifi->interface, group);
if (supplicant_network) {
g_supplicant_network_set_signal(supplicant_network, strength);
diff --git a/src/dhcp.c b/src/dhcp.c
index 7c446cf8..f15a214f 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -848,7 +848,7 @@ int __connman_dhcp_start(struct connman_ipconfig *ipconfig,
dhcp->user_data = user_data;
#if defined TIZEN_EXT
- if (connman_network_get_bool(network, "WiFi.RoamingDHCP")) {
+ if (network && connman_network_get_bool(network, "WiFi.RoamingDHCP")) {
const char *last_addr = __connman_ipconfig_get_dhcp_address(ipconfig);
DBG("Start DHCP with last address request");