[telepathy-gabble/master] the Credentials access control doesn't have an associated variant

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Thu May 14 05:14:58 PDT 2009


After more discussion we decided that the Credentials access control
shouldn't have an associated variant as the byte is not part of the
access control process.
---
 src/tube-stream.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/tube-stream.c b/src/tube-stream.c
index 3cf90c2..3110e38 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1882,24 +1882,12 @@ check_unix_params (TpSocketAddressType address_type,
       g_string_free (socket_address, TRUE);
     }
 
-  if (access_control == TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
+  if (access_control == TP_SOCKET_ACCESS_CONTROL_LOCALHOST ||
+      access_control == TP_SOCKET_ACCESS_CONTROL_CREDENTIALS)
   {
+    /* no variant associated */
     return TRUE;
   }
-  else if (access_control == TP_SOCKET_ACCESS_CONTROL_CREDENTIALS)
-    {
-      if (access_control_param != NULL)
-        {
-          if (G_VALUE_TYPE (access_control_param) !=
-              G_TYPE_UCHAR)
-            {
-              g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
-                  "Credentials access param is supposed to be y");
-              return FALSE;
-            }
-        }
-      return TRUE;
-    }
 
   g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
       "%u socket access control is not supported", access_control);
-- 
1.5.6.5




More information about the telepathy-commits mailing list