network: Scope correctly the connection variable
This commit is contained in:
parent
e7e02390b6
commit
7e708ae52c
1 changed files with 2 additions and 1 deletions
|
@ -1089,7 +1089,6 @@ wireless_try_to_connect (NetDeviceWifi *device_wifi,
|
|||
const gchar *ssid_tmp;
|
||||
GSList *list, *l;
|
||||
GSList *filtered;
|
||||
NMConnection *connection;
|
||||
NMConnection *connection_activate = NULL;
|
||||
NMDevice *device;
|
||||
NMSettingWireless *setting_wireless;
|
||||
|
@ -1116,6 +1115,8 @@ wireless_try_to_connect (NetDeviceWifi *device_wifi,
|
|||
filtered = nm_device_filter_connections (device, list);
|
||||
g_debug ("%i suitable remote connections to check", g_slist_length (filtered));
|
||||
for (l = filtered; l; l = g_slist_next (l)) {
|
||||
NMConnection *connection;
|
||||
|
||||
connection = NM_CONNECTION (l->data);
|
||||
setting_wireless = nm_connection_get_setting_wireless (connection);
|
||||
if (!NM_IS_SETTING_WIRELESS (setting_wireless))
|
||||
|
|
Loading…
Add table
Reference in a new issue