Ref the auth domain when adding it.
authorDan Winship <danw@src.gnome.org>
Thu, 7 Feb 2008 03:04:59 +0000 (03:04 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 7 Feb 2008 03:04:59 +0000 (03:04 +0000)
* libsoup/soup-server.c (soup_server_add_auth_domain): Ref the
auth domain when adding it.

* tests/continue-test.c (setup_server):
* tests/server-auth-test.c (main): Add unrefs here to avoid
leaking now

svn path=/trunk/; revision=1076

ChangeLog
libsoup/soup-server.c
tests/continue-test.c
tests/server-auth-test.c

index d562166..0352fa7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-02-06  Dan Winship  <danw@gnome.org>
 
+       * libsoup/soup-server.c (soup_server_add_auth_domain): Ref the
+       auth domain when adding it.
+
+       * tests/continue-test.c (setup_server):
+       * tests/server-auth-test.c (main): Add unrefs here to avoid
+       leaking now
+
+2008-02-06  Dan Winship  <danw@gnome.org>
+
        * libsoup/soup-message.c (soup_message_set_chunk_allocator): New
        method that lets the application set a callback function to use to
        allocate SoupBuffers for reading into, so as to avoid needing
index 75d0227..9d870ad 100644 (file)
@@ -1218,6 +1218,7 @@ soup_server_add_auth_domain (SoupServer *server, SoupAuthDomain *auth_domain)
        priv = SOUP_SERVER_GET_PRIVATE (server);
 
        priv->auth_domains = g_slist_prepend (priv->auth_domains, auth_domain);
+       g_object_ref (auth_domain);
 }
 
 /**
index b039031..ee5e18e 100644 (file)
@@ -432,6 +432,7 @@ setup_server (void)
                SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, auth_callback,
                NULL);
        soup_server_add_auth_domain (server, auth_domain);
+       g_object_unref (auth_domain);
 
        return server;
 }
index eb438cc..7f6dad0 100644 (file)
@@ -336,6 +336,7 @@ main (int argc, char **argv)
                SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, basic_auth_callback,
                NULL);
        soup_server_add_auth_domain (server, auth_domain);
+       g_object_unref (auth_domain);
 
        auth_domain = soup_auth_domain_digest_new (
                SOUP_AUTH_DOMAIN_REALM, "server-auth-test",
@@ -345,6 +346,7 @@ main (int argc, char **argv)
                SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK, digest_auth_callback,
                NULL);
        soup_server_add_auth_domain (server, auth_domain);
+       g_object_unref (auth_domain);
 
        loop = g_main_loop_new (NULL, TRUE);