mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 20:30:13 +01:00
2005-07-07 Dan Williams <dcbw@redhat.com>
Patch from Derek Atkins <warlord@MIT.EDU> * src/nm-dbus-net.c: - (nm_dbus_get_ap_from_object_path): differentiate similar ESSIDs git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@791 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
fdf4947cdb
commit
07f489a125
2 changed files with 17 additions and 4 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2005-07-07 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Derek Atkins <warlord@MIT.EDU>
|
||||
* src/nm-dbus-net.c:
|
||||
- (nm_dbus_get_ap_from_object_path): differentiate similar ESSIDs
|
||||
|
||||
2005-07-07 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Jos Dehaes <jos_dehaes@fastmail.fm>
|
||||
|
|
|
|||
|
|
@ -52,14 +52,21 @@ static NMAccessPoint *nm_dbus_get_ap_from_object_path (const char *path, NMDevic
|
|||
|
||||
while ((ap = nm_ap_list_iter_next (iter)))
|
||||
{
|
||||
int len;
|
||||
|
||||
snprintf (compare_path, 100, "%s/%s/Networks/%s", NM_DBUS_PATH_DEVICES,
|
||||
nm_device_get_iface (dev), nm_ap_get_essid (ap));
|
||||
escaped_compare_path = nm_dbus_escape_object_path (compare_path);
|
||||
if (strncmp (path, escaped_compare_path,
|
||||
strlen (escaped_compare_path)) == 0)
|
||||
|
||||
len = strlen(escaped_compare_path);
|
||||
if (strncmp (path, escaped_compare_path, len) == 0)
|
||||
{
|
||||
g_free (escaped_compare_path);
|
||||
break;
|
||||
/* Differentiate between 'foo' and 'foo-a' */
|
||||
if (path[len] == '\0' || path[len] == '/')
|
||||
{
|
||||
g_free (escaped_compare_path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_free (escaped_compare_path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue