summaryrefslogtreecommitdiff
path: root/tests/ntlm-test.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-09-30 15:43:17 +0000
committerDan Winship <danw@src.gnome.org>2008-09-30 15:43:17 +0000
commitdd40c1515f1687c614f2dc670aca49fad8ad2088 (patch)
treed655241a87d19acc345dcdba90c09172426c0227 /tests/ntlm-test.c
parent91c185ead4d7d5560887d7fa13aeecf9ed320998 (diff)
downloadlibsoup-dd40c1515f1687c614f2dc670aca49fad8ad2088.tar.gz
libsoup-dd40c1515f1687c614f2dc670aca49fad8ad2088.tar.bz2
libsoup-dd40c1515f1687c614f2dc670aca49fad8ad2088.zip
store the GSource in priv, don't ref the session. Otherwise the session
* libsoup/soup-session-async.c (do_idle_run_queue): store the GSource in priv, don't ref the session. Otherwise the session won't get destroyed if you abort it and then don't return to its main loop. (addendum to #498509, Arnout Vandecappelle) (finalize): Destroy the idle_run_queue source when finalizing. (run_queue, got_connection): Ref the session when calling soup_connection_connect_async(), and do a do_idle_run_queue()+unref in got_connection, to ensure correct handling regardless of what the application does with its own ref on the session. (final_finished): Likewise, ref/do_idle_run_queue/unref rather than calling run_queue directly and playing with weak pointers. * libsoup/soup-session.c (connect_result): ref the session around the cancel-if-error loop Fixes #533473, crash in seahorse when connecting to a non-responsive key server. * tests/misc-test.c (do_callback_unref_test): Add a test for the bug in #533473. * tests/test-utils.c (soup_test_session_abort_unref): abort and unref a SoupSession, and consider it an error if the session still exists afterward. Suggested by Arnout Vandecappelle. (test_server_shutdown): Likewise, consider it an error if the server is leaked. * tests/*.c: Use soup_test_session_abort_unref(). svn path=/trunk/; revision=1168
Diffstat (limited to 'tests/ntlm-test.c')
-rw-r--r--tests/ntlm-test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/ntlm-test.c b/tests/ntlm-test.c
index fc4c0823..6c6d6d37 100644
--- a/tests/ntlm-test.c
+++ b/tests/ntlm-test.c
@@ -385,8 +385,7 @@ do_ntlm_round (SoupURI *base_uri, gboolean use_ntlm, const char *user)
user != NULL ? SOUP_STATUS_OK :
SOUP_STATUS_UNAUTHORIZED);
- soup_session_abort (session);
- g_object_unref (session);
+ soup_test_session_abort_unref (session);
}
static void