summaryrefslogtreecommitdiff
path: root/tests/context-test.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow calling soup_test_server_new() multiple times in test programsDan Winship2010-06-111-0/+1
|
* Bug 576583 - Tests fail if "localhost" resolves to ::1Dan Winship2009-03-271-1/+1
| | | | | | | | | | | * tests/*.c: Use "127.0.0.1" in URIs rather than "localhost", since the default SoupServer config only listen on IPv4 (qv bug 522519), and tests/httpd.conf.in only configures apache to listen on IPv4, and we don't handle multiple IP addresses (qv bug 526321) but the machine might be configured to return "::1" rather than "127.0.0.1" first for "localhost". Patch from Andreas Rottmann. svn path=/trunk/; revision=1257
* store the GSource in priv, don't ref the session. Otherwise the sessionDan Winship2008-09-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Misc fixes noticed by "sparse" or by running gcc with additionalDan Winship2008-04-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -W flags * libsoup/soup-auth-manager-ntlm.c (ntlm_authorize_post): fix a potentially uninitialized variable. (Grumble. gcc needs -Wdo-optimization-so-you-can-generate-code-flow-related-warnings- but-then-emit-unoptimized-code-for-ease-of-debugging) * libsoup/soup-gnutls.c (soup_gnutls_channel_funcs): make this static * libsoup/soup-uri.c (uri_decoded_copy, uri_normalized_copy): add "static". (This doesn't change the generated code; the prototype was already declared static and so gcc was treating the function as static even though the main declaration *wasn't* declared static. I'm not sure if this is a bug in gcc or an oddity of the spec, but it's confusing, so...) * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_method_response): s/FALSE/NULL/ * libsoup/soup-xmlrpc.h: add G_GNUC_PRINTF to soup_xmlrpc_build_format * tests/*.c: misc minor fixes, mostly involving missing "const"s and "static"s to get better warnings, and then remove some unused variables. * tests/continue-test.c (do_message): fix a crash when the test fails * tests/test-utils.h (debug_printf): add G_GNUC_PRINTF to prototype svn path=/trunk/; revision=1123
* Merge libsoup-2.4 branch to trunkDan Winship2008-01-151-151/+63
| | | | | | * Merge libsoup-2.4 branch to trunk svn path=/trunk/; revision=1041
* don't leak the async_contextDan Winship2007-11-211-0/+366
* libsoup/soup-message-io.c (soup_message_io_unpause): don't leak the async_context * libsoup/soup-server.c (soup_server_quit): disconnect the "new_connection" handler. (soup_server_get_async_context): Convenience method to return the server's async_context. * libsoup/soup-server-message.c: don't circularly ref the server, there's no need anyway. * libsoup/soup-session.c (soup_session_get_async_context): Convenience method to return the session's async_context. * libsoup/soup-session-async.c (queue_message): call run_queue in the session's async_context, not the main context. (send_message): don't leak the async_context * libsoup/soup-session-sync.c (queue_message_thread): don't leak the async_context * tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works and doesn't leak svn path=/trunk/; revision=954