[tracker] libtracker-miner: Fixed GNOME password provider using libsecret



commit 22722c92adedde8984f29a1b962cc57a8696da8e
Author: Martyn Russell <martyn lanedo com>
Date:   Wed Feb 6 15:42:50 2013 +0000

    libtracker-miner: Fixed GNOME password provider using libsecret
    
    - "user" --> "username" for the attributes lookup
    - Was checking for SecretItem != NULL to error up the stack
    
    Thanks to Stef Walter for the help here.

 .../tracker-password-provider-gnome.c              |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-password-provider-gnome.c b/src/libtracker-miner/tracker-password-provider-gnome.c
index cce0738..30e7bd9 100644
--- a/src/libtracker-miner/tracker-password-provider-gnome.c
+++ b/src/libtracker-miner/tracker-password-provider-gnome.c
@@ -236,7 +236,7 @@ password_provider_gnome_get (TrackerPasswordProvider  *provider,
 		secret = secret_item_get_secret (found);
 	}
 
-	if (secret != NULL) {
+	if (secret == NULL) {
 		g_set_error_literal (error,
 		                     TRACKER_PASSWORD_PROVIDER_ERROR,
 		                     TRACKER_PASSWORD_PROVIDER_ERROR_NOTFOUND,
@@ -249,7 +249,7 @@ password_provider_gnome_get (TrackerPasswordProvider  *provider,
 	if (username) {
 		/* Make sure it is always set */
 		attributes = secret_item_get_attributes (found);
-		*username = g_hash_table_lookup (attributes, "user");
+		*username = g_strdup (g_hash_table_lookup (attributes, "username"));
 		g_hash_table_unref (attributes);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]