After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629661 - NM not passing all favourite conections to real_get_best_autoconnection at startup
NM not passing all favourite conections to real_get_best_autoconnection at st...
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2010-09-14 13:52 UTC by Franco Miceli
Modified: 2012-07-24 19:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log of the connection report by NM (4.22 KB, text/plain)
2010-09-28 18:56 UTC, Franco Miceli
Details

Description Franco Miceli 2010-09-14 13:52:03 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.
Comment 1 Franco Miceli 2010-09-14 13:54:35 UTC
The platform I'm testing this on is OLPC XO1 Fedora 11.
Comment 2 Franco Miceli 2010-09-14 18:27:59 UTC
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.
Comment 3 Dan Williams 2010-09-17 18:14:41 UTC
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.
Comment 4 Franco Miceli 2010-09-28 18:56:00 UTC
Created attachment 171290 [details]
Log of the connection report by NM
Comment 5 Franco Miceli 2010-09-28 19:01:18 UTC
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.
Comment 6 Franco Miceli 2010-11-09 15:56:15 UTC
Can I do something to help close this issue?
Any other tests that might clarify the problem?

Tks.
Comment 7 Fabio Durán Verdugo 2010-12-03 03:58:46 UTC
any news for this report?
Comment 8 Pavel Simerda 2012-07-24 19:46:28 UTC
Reopen if still applicable.