diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-07-27 21:21:15 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-02-22 15:16:49 +0000 |
commit | 3288b5db382c93e1b35b300b128a6339a163c30d (patch) | |
tree | 095cea2c46d05e358f21598013726ce42c613ba1 | |
parent | fc0009487dd166ef76edb1923f471e6cd65aa70b (diff) |
Don't advertise support for credentials-passing on platforms where it won't work
-rw-r--r-- | src/tube-stream.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tube-stream.c b/src/tube-stream.c index e71fe82af..e39532f39 100644 --- a/src/tube-stream.c +++ b/src/tube-stream.c @@ -2358,8 +2358,15 @@ gabble_tube_stream_get_supported_socket_types (void) 1); access_control = TP_SOCKET_ACCESS_CONTROL_LOCALHOST; g_array_append_val (unix_tab, access_control); - access_control = TP_SOCKET_ACCESS_CONTROL_CREDENTIALS; - g_array_append_val (unix_tab, access_control); + + /* Credentials-passing is non-portable, so only advertise it on platforms + * where we have an implementation (like Linux) */ + if (gibber_unix_transport_supports_credentials ()) + { + access_control = TP_SOCKET_ACCESS_CONTROL_CREDENTIALS; + g_array_append_val (unix_tab, access_control); + } + g_hash_table_insert (ret, GUINT_TO_POINTER (TP_SOCKET_ADDRESS_TYPE_UNIX), unix_tab); |