mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 04:20:11 +01:00
tui: use nm_streq0() in nmt_connect_connection_list_get_connection()
This commit is contained in:
parent
1fcbb69ae2
commit
3443f25001
1 changed files with 7 additions and 9 deletions
|
|
@ -621,7 +621,6 @@ nmt_connect_connection_list_get_connection (NmtConnectConnectionList *list,
|
|||
NmtConnectDevice *nmtdev;
|
||||
NmtConnectConnection *nmtconn = NULL;
|
||||
NMConnection *conn = NULL;
|
||||
const char *iface = NULL;
|
||||
|
||||
g_return_val_if_fail (identifier, FALSE);
|
||||
|
||||
|
|
@ -640,22 +639,21 @@ nmt_connect_connection_list_get_connection (NmtConnectConnectionList *list,
|
|||
if (conn) {
|
||||
if (conn == nmtconn->conn)
|
||||
goto found;
|
||||
} else if (nmtconn->ssid && !strcmp (identifier, nmtconn->ssid))
|
||||
} else if (nm_streq0 (identifier, nmtconn->ssid))
|
||||
goto found;
|
||||
}
|
||||
|
||||
if (!conn && nmtdev->device) {
|
||||
iface = nm_device_get_ip_iface (nmtdev->device);
|
||||
if (iface && !strcmp (identifier, iface)) {
|
||||
nmtconn = nmtdev->conns->data;
|
||||
goto found;
|
||||
}
|
||||
if ( !conn
|
||||
&& nmtdev->device
|
||||
&& nm_streq0 (identifier, nm_device_get_ip_iface (nmtdev->device))) {
|
||||
nmtconn = nmtdev->conns->data;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
found:
|
||||
found:
|
||||
if (connection)
|
||||
*connection = nmtconn->conn;
|
||||
if (device)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue