[Xfce4-commits] <midori:master> Always copy the cookie filename when attaching

Christian Dywan noreply at xfce.org
Thu May 5 00:54:01 CEST 2011


Updating branch refs/heads/master
         to 7f45ce2ce216038f72bf284dca11b5dfe6180072 (commit)
       from b74d00abe6f3f9a1484eba3923357d5a6a8c9b7c (commit)

commit 7f45ce2ce216038f72bf284dca11b5dfe6180072
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed May 4 23:53:45 2011 +0200

    Always copy the cookie filename when attaching
    
    Otherwise we'll have freed the original filename when
    detaching and attaching again.

 katze/katze-http-cookies.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/katze/katze-http-cookies.c b/katze/katze-http-cookies.c
index 304bf8d..a25f62a 100644
--- a/katze/katze-http-cookies.c
+++ b/katze/katze-http-cookies.c
@@ -276,10 +276,11 @@ katze_http_cookies_attach (SoupSessionFeature* feature,
                            SoupSession*        session)
 {
     KatzeHttpCookies* http_cookies = (KatzeHttpCookies*)feature;
+    const gchar* filename = g_object_get_data (G_OBJECT (feature), "filename");
     SoupSessionFeature* jar = soup_session_get_feature (session, SOUP_TYPE_COOKIE_JAR);
     g_return_if_fail (jar != NULL);
-    http_cookies->filename = g_object_get_data (G_OBJECT (feature), "filename");
-    g_return_if_fail (http_cookies->filename != NULL);
+    g_return_if_fail (filename != NULL);
+    katze_assign (http_cookies->filename, g_strdup (filename));
     http_cookies->jar = g_object_ref (jar);
     cookie_jar_load (http_cookies->jar, http_cookies->filename);
     g_signal_connect (jar, "changed",



More information about the Xfce4-commits mailing list