[telepathy-gabble/master] Don't advertise support for credentials-passing on platforms where it won't work
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Sep 10 06:19:26 PDT 2009
---
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 b90b8f9..775efe6 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -2368,8 +2368,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);
--
1.5.6.5
More information about the telepathy-commits
mailing list