2004-10-21 Dan Williams <dcbw@redhat.com>

* Add some support for telling NetworkManagerInfo to tell the user
		that they are using a device that's not fully supported

	* Fix some assertions in debug messages due to null access point args


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@264 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2004-10-21 19:33:41 +00:00
parent f145f77bf9
commit 3fbfa66df2
6 changed files with 36 additions and 12 deletions

View File

@@ -1,3 +1,10 @@
2004-10-21 Dan Williams <dcbw@redhat.com>
* Add some support for telling NetworkManagerInfo to tell the user
that they are using a device that's not fully supported
* Fix some assertions in debug messages due to null access point args
2004-10-21 Dan Williams <dcbw@redhat.com> 2004-10-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c * src/NetworkManagerDevice.c

View File

@@ -1036,6 +1036,7 @@ static DBusHandlerResult nm_dbus_nmi_filter (DBusConnection *connection, DBusMes
{ {
data->update_ap_lists = TRUE; data->update_ap_lists = TRUE;
data->info_daemon_avail = TRUE; data->info_daemon_avail = TRUE;
data->notify_device_support = TRUE;
nm_data_mark_state_changed (data); nm_data_mark_state_changed (data);
} }
/* Don't set handled = TRUE since other filter functions on this dbus connection /* Don't set handled = TRUE since other filter functions on this dbus connection
@@ -1053,6 +1054,7 @@ static DBusHandlerResult nm_dbus_nmi_filter (DBusConnection *connection, DBusMes
{ {
data->update_ap_lists = TRUE; data->update_ap_lists = TRUE;
data->info_daemon_avail = FALSE; data->info_daemon_avail = FALSE;
data->notify_device_support = TRUE;
nm_data_mark_state_changed (data); nm_data_mark_state_changed (data);
} }
/* Don't set handled = TRUE since other filter functions on this dbus connection /* Don't set handled = TRUE since other filter functions on this dbus connection

View File

@@ -1399,9 +1399,15 @@ void nm_device_activate_wireless_wait_for_link (NMDevice *dev)
|| (best_ap && (nm_ap_get_encrypted (best_ap) && || (best_ap && (nm_ap_get_encrypted (best_ap) &&
(!nm_ap_get_enc_key_source (best_ap) || !strlen (nm_ap_get_enc_key_source (best_ap)))))) (!nm_ap_get_enc_key_source (best_ap) || !strlen (nm_ap_get_enc_key_source (best_ap))))))
{ {
syslog (LOG_NOTICE, "LINK: !HAVE=%d, (best_ap=0x%X && (is_enc=%d && (!source=%d || !len_source=%d)))\n", if (best_ap)
!HAVE_LINK (dev, bad_crypt_packets), best_ap, nm_ap_get_encrypted (best_ap), !nm_ap_get_enc_key_source (best_ap), {
nm_ap_get_enc_key_source (best_ap) ? !strlen (nm_ap_get_enc_key_source (best_ap)) : 0); syslog (LOG_NOTICE, "LINK: !HAVE=%d, (best_ap=0x%X && (is_enc=%d && (!source=%d || !len_source=%d)))",
!HAVE_LINK (dev, bad_crypt_packets), best_ap, nm_ap_get_encrypted (best_ap), !nm_ap_get_enc_key_source (best_ap),
nm_ap_get_enc_key_source (best_ap) ? !strlen (nm_ap_get_enc_key_source (best_ap)) : 0);
}
else
syslog (LOG_NOTICE, "LINK: !HAVE=%d, (best_ap=NULL)", !HAVE_LINK (dev, bad_crypt_packets));
if ((best_ap = nm_device_get_best_ap (dev))) if ((best_ap = nm_device_get_best_ap (dev)))
{ {

View File

@@ -37,6 +37,7 @@ typedef struct NMData
gboolean enable_test_devices; gboolean enable_test_devices;
gboolean starting_up; /* Hack for not taking down an already-set-up wired device when we launch */ gboolean starting_up; /* Hack for not taking down an already-set-up wired device when we launch */
gboolean notify_device_support;
GSList *dev_list; GSList *dev_list;
GMutex *dev_list_mutex; GMutex *dev_list_mutex;

View File

@@ -248,16 +248,24 @@ gboolean nm_state_modification_monitor (gpointer user_data)
g_return_val_if_fail (data != NULL, TRUE); g_return_val_if_fail (data != NULL, TRUE);
/* If the info daemon is now running, get our trusted/preferred ap lists from it */ /* If the info daemon is now running, get our trusted/preferred ap lists from it */
if (data->info_daemon_avail && data->update_ap_lists) if (data->info_daemon_avail)
{ {
/* Query info daemon for network lists if its now running */ if (data->update_ap_lists)
if (data->allowed_ap_list) {
nm_ap_list_unref (data->allowed_ap_list); /* Query info daemon for network lists if its now running */
data->allowed_ap_list = nm_ap_list_new (NETWORK_TYPE_ALLOWED); if (data->allowed_ap_list)
if (data->allowed_ap_list) nm_ap_list_unref (data->allowed_ap_list);
nm_ap_list_populate (data->allowed_ap_list, data); data->allowed_ap_list = nm_ap_list_new (NETWORK_TYPE_ALLOWED);
if (data->allowed_ap_list)
nm_ap_list_populate (data->allowed_ap_list, data);
data->update_ap_lists = FALSE;
}
data->update_ap_lists = FALSE; if (data->notify_device_support)
{
data->notify_device_support = FALSE;
}
} }
/* Check global state modified variable, and reset it with /* Check global state modified variable, and reset it with

View File

@@ -260,7 +260,7 @@ static driver_support wired_driver_blacklist[] =
/* /*
* nm_get_device_driver_name * nm_get_device_driver_name
* *
* Checks either /proc/sys/bus/devices or /var/lib/pcmcia/stab to determine * Checks either /proc/bus/pci/devices or /var/lib/pcmcia/stab to determine
* which driver is bound to the device. * which driver is bound to the device.
* *
*/ */