[planner: 15/40] Do not throw the login when there is no password.




commit 8ac40a82de71648f862064f9cf5a33a0c34085d7
Author: Ahmed Baïzid <ahmed baizid org>
Date:   Thu Jun 18 15:15:35 2015 +0200

    Do not throw the login when there is no password.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=584556

 libplanner/mrp-storage-sql.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/libplanner/mrp-storage-sql.c b/libplanner/mrp-storage-sql.c
index de8f01d2..1c448906 100644
--- a/libplanner/mrp-storage-sql.c
+++ b/libplanner/mrp-storage-sql.c
@@ -230,8 +230,10 @@ storage_sql_parse_uri (const gchar  *uri,
                *login = strdup_null_if_empty (strs[0]);
                *password = strdup_null_if_empty (strs[1]);
                g_strfreev (strs);
+               g_free (who);
+       } else if (who) {
+               *login = who;
        }
-       g_free (who);
 
        if (host && strchr (host, ':')) {
                strs = g_strsplit (host, ":", 2);


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