[librest/wip/baedert/tests] test-server: Pass the test_server to the server callback
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest/wip/baedert/tests] test-server: Pass the test_server to the server callback
- Date: Sun, 31 Jul 2016 09:51:37 +0000 (UTC)
commit ce1e7a4015c84bcaa87ab52c4afc10fdc9f19006
Author: Timm Bäder <mail baedert org>
Date: Tue Jul 26 19:48:21 2016 +0200
test-server: Pass the test_server to the server callback
tests/test-server.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-server.c b/tests/test-server.c
index a033aec..5e6c484 100644
--- a/tests/test-server.c
+++ b/tests/test-server.c
@@ -39,8 +39,6 @@ test_server_create (SoupServerCallback server_cb)
soup_server_listen_local (server, 0, 0, &error);
g_assert_no_error (error);
- soup_server_add_handler (server, "/", server_cb,
- NULL, NULL);
uris = soup_server_get_uris (server);
g_assert (g_slist_length (uris) > 0);
@@ -52,6 +50,10 @@ test_server_create (SoupServerCallback server_cb)
test_server->url = url;
test_server->thread = NULL;
+ soup_server_add_handler (server, "/", server_cb,
+ test_server, NULL);
+
+
g_slist_free_full (uris, (GDestroyNotify)soup_uri_free);
g_main_context_pop_thread_default (context);
@@ -80,6 +82,7 @@ test_server_run (TestServer *server)
void
test_server_stop (TestServer *server)
{
+ g_message (__FUNCTION__);
g_assert (server->thread);
g_main_loop_quit (server->main_loop);
g_thread_join (server->thread);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]