GNOME Bugzilla – Bug 629661
NM not passing all favourite conections to real_get_best_autoconnection at startup
Last modified: 2012-07-24 19:46:28 UTC
Debugging the function query_connections within nm-manager.c, and at the same time debugging the connections passed to real_get_best_autoconnection at startup, I found that ListConnections reports all the favourite wireless connections I have on my machine, but only one gets passed to real_get_best_autoconnection -the first time it gets called-. After it gets executed for the first time all favourite connections get passed to real_get_best_autoconnection. It is important since the autoconnection method doesn't have all the info it needs in order to choose a connection correctly.
The platform I'm testing this on is OLPC XO1 Fedora 11.
Doing a little more debugging I found that in this lines of NetworkManagerPolicy.c: static gboolean auto_activate_device (gpointer user_data) . . . /* System connections first, then user connections */ connections = nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_SYSTEM); connections = g_slist_concat (connections, nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_USER)); The variable connections -at startup- has only one connection. Do not know why.
Can you do a bit more debugging and figure out where the single connection is coming from? ie something like: connections = nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_SYSTEM); g_message ("%s: #1 %d connections", __func__, g_slist_length (connections)); connections = g_slist_concat (connections, nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_USER)); g_message ("%s: #2 %d connections", __func__, g_slist_length (connections)); It could be a race between getitng all the connections from the system, and getting them from the user applet too. On slower machiens it'll take longer for the applet to deliver connections.
Created attachment 171290 [details] Log of the connection report by NM
Before I sent the log of the /var/log/messages portion of what Dan sugested. Sorry fir the delayed response. It seems that even when ListConnections shows all of the users connectios, nm_manager_get_connections does not, and it gets executed after ListConnections. I don't know if it could be as simple as replacing nm_manager_get_connections for ListConnections. Hope the log helps identify the issue.
Can I do something to help close this issue? Any other tests that might clarify the problem? Tks.
any news for this report?
Reopen if still applicable.