From 1ef73f7e368e618553e70b6fe887fc80d27d68d2 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 12 Jul 2011 14:55:37 +0200 Subject: [PATCH] tests/lib/stream-tube-chan: don't try to use UNIX socket if not supported https://bugs.freedesktop.org/show_bug.cgi?id=38997 --- tests/lib/stream-tube-chan.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/tests/lib/stream-tube-chan.c b/tests/lib/stream-tube-chan.c index 803c386..d482bd2 100644 --- a/tests/lib/stream-tube-chan.c +++ b/tests/lib/stream-tube-chan.c @@ -8,6 +8,8 @@ * notice and this notice are preserved. */ +#include "config.h" + #include "stream-tube-chan.h" #include "util.h" @@ -16,8 +18,10 @@ #include #include +#ifdef HAVE_GIO_UNIX #include #include +#endif #include @@ -406,6 +410,7 @@ service_incoming_cb (GSocketService *service, if (self->priv->access_control == TP_SOCKET_ACCESS_CONTROL_CREDENTIALS) { +#ifdef HAVE_GIO_UNIX GCredentials *creds; guchar byte; @@ -417,6 +422,10 @@ service_incoming_cb (GSocketService *service, g_assert_cmpuint (byte, ==, g_value_get_uchar (self->priv->access_control_param)); g_object_unref (creds); +#else + /* Tests shouldn't use this if not supported */ + g_assert (FALSE); +#endif } else if (self->priv->access_control == TP_SOCKET_ACCESS_CONTROL_PORT) { @@ -521,6 +530,7 @@ tp_tests_stream_tube_channel_peer_connected (TpTestsStreamTubeChannel *self, case TP_SOCKET_ACCESS_CONTROL_CREDENTIALS: { +#ifdef HAVE_GIO_UNIX GError *error = NULL; guchar byte = g_random_int_range (0, G_MAXUINT8); @@ -530,6 +540,10 @@ tp_tests_stream_tube_channel_peer_connected (TpTestsStreamTubeChannel *self, g_assert_no_error (error); connection_param = tp_g_value_slice_new_byte (byte); +#else + /* Tests shouldn't use this if not supported */ + g_assert (FALSE); +#endif } break; -- 1.7.4.1