GNOME Bugzilla – Bug 694651
more libsecret porting
Last modified: 2013-02-27 09:25:58 UTC
see patches
Created attachment 237336 [details] [review] applet: free the GCancellables used with libsecret
Created attachment 237337 [details] [review] applet: belatedly port applet-device-broadband to libsecret This code was added after the original libsecret port, and got missed in the rebasing...
Review of attachment 237337 [details] [review]: Something like this should fix it: diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c index 55066bb..7f0e539 100644 --- a/src/applet-device-broadband.c +++ b/src/applet-device-broadband.c @@ -390,8 +390,7 @@ keyring_pin_check_cb (GObject *source, /* Look for a matching "simid" attribute */ attributes = secret_item_get_attributes (item); - simid = g_hash_table_lookup (attributes, "simid"); - if (g_strcmp0 (simid, info->simid)) + if (g_strcmp0 (simid, g_hash_table_lookup (attributes, "simid"))) pin = secret_item_get_secret (item); else pin = NULL; @@ -684,7 +683,6 @@ add_connection_item (NMDevice *device, info->applet = applet; info->device = g_object_ref (G_OBJECT (device)); info->connection = connection ? g_object_ref (connection) : NULL; - info->cancellable = g_cancellable_new (); g_signal_connect_data (item, "activate", G_CALLBACK (menu_item_activate), ::: src/applet-device-broadband.c @@ +392,3 @@ + attributes = secret_item_get_attributes (item); + simid = g_hash_table_lookup (attributes, "simid"); + if (g_strcmp0 (simid, info->simid)) This bit actually fails; 'simid' is already defined above as the modem's simid from ModemManager (via "simid = mm_sim_get_identifier()"), plus the simid isn't in 'info' either. Needs to be something like: if (g_strcmp0 (simid, g_hash_table_lookup (attributes, "simid"))) or use a temporary variable. applet-device-broadband.c: In function ‘keyring_pin_check_cb’: applet-device-broadband.c:394:30: error: ‘BroadbandDeviceInfo’ has no member named ‘simid’ @@ +685,3 @@ info->device = g_object_ref (G_OBJECT (device)); info->connection = connection ? g_object_ref (connection) : NULL; + info->cancellable = g_cancellable_new (); This isn't required: applet-device-broadband.c: In function ‘add_connection_item’: applet-device-broadband.c:687:6: error: ‘BroadbandMenuItemInfo’ has no member named ‘cancellable’ only the cancellable in BroadbandDeviceInfo is required (added below).
Review of attachment 237336 [details] [review]: Looks good.