[libsoup] connection-test: make it not require access to private SoupConnection symbols
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] connection-test: make it not require access to private SoupConnection symbols
- Date: Fri, 2 Nov 2012 16:11:45 +0000 (UTC)
commit fed907815cb566ba4ebf7c6cb41e3656015eeec7
Author: Dan Winship <danw gnome org>
Date: Fri Nov 2 12:07:30 2012 -0400
connection-test: make it not require access to private SoupConnection symbols
tests/connection-test.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/tests/connection-test.c b/tests/connection-test.c
index ef21ec9..8050b3d 100644
--- a/tests/connection-test.c
+++ b/tests/connection-test.c
@@ -5,8 +5,6 @@
#include "test-utils.h"
-#include "libsoup/soup-connection.h"
-
SoupServer *server;
SoupURI *base_uri;
GMutex server_mutex;
@@ -713,11 +711,10 @@ static void
connection_state_changed (GObject *object, GParamSpec *param,
gpointer user_data)
{
- SoupConnection *conn = SOUP_CONNECTION (object);
SoupConnectionState *state = user_data;
SoupConnectionState new_state;
- new_state = soup_connection_get_state (conn);
+ g_object_get (object, "state", &new_state, NULL);
if (state_transitions[*state] != new_state) {
debug_printf (1, " Unexpected transition: %s -> %s\n",
state_names[*state], state_names[new_state]);
@@ -731,12 +728,12 @@ connection_state_changed (GObject *object, GParamSpec *param,
}
static void
-connection_created (SoupSession *session, SoupConnection *conn,
+connection_created (SoupSession *session, GObject *conn,
gpointer user_data)
{
SoupConnectionState *state = user_data;
- *state = soup_connection_get_state (conn);
+ g_object_get (conn, "state", state, NULL);
if (*state != SOUP_CONNECTION_NEW) {
debug_printf (1, " Unexpected initial state: %d\n",
*state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]