[Bug 29218] TpStreamTube - high level stream tube API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 6 16:13:32 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=29218

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |review-, minor changes

--- Comment #34 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-10-06 07:13:32 PDT ---
gnio-util.c
> +#include <gio/gunixcredentialsmessage.h>

Does this still exist when we don't have gio-unix?

> +G_DEFINE_TYPE (TpStreamTubeChannel, tp_stream_tube_channel, TP_TYPE_CHANNEL);

Nitpicking: trailing semicolon here isn't needed, isn't valid C99 and makes
some compilers complain.

> +  g_hash_table_foreach_remove (self->priv->tube_connections, is_connection,
> +      conn);

Nitpicking: could use GHashTableIter and g_hash_table_iter_remove()?

> +tp_stream_tube_channel_dispose (GObject *obj)
...
> +      g_cancellable_cancel (self->priv->cancellable);

I think this deserves a comment, at least. Why do you do this? Is the idea that
if the channel is disposed while an async call is in flight, it'll
automatically cancel itself?

(I would have thought that the channel would hold one ref to itself for the
duration of an async call?)

> +      case TP_SOCKET_ADDRESS_TYPE_UNIX:
> +        family = G_SOCKET_FAMILY_UNIX;
> +        break;

I think this needs an "it's Unix" guard.

> +++ b/telepathy-glib/util-internal.h
...
> +#ifdef HAVE_GIO_UNIX

If you check HAVE_SOMETHING in a file, then that file should include "config.h"
at the top, and cannot be installed. (This is an uninstalled header, so that's
OK.)

One alternative would be to have _tp_create_temp_unix_socket exist even on
non-Unix, but always fail with whatever the GLib equivalent of ENOTSUPP is.

> +  /* FIXME: Actually TP_SOCKET_ACCESS_CONTROL_CREDENTIALS is also able to
> +   * properly identify connections and our code should be able to.
> +   * But we can't test it as we currently use sync calls to send and
> +   * receive credentials. We should change that once bgo #629503
> +   * has been fixed. */

Would it be possible to test this by ensuring that the send happens before the
receive, and assuming that there's enough send-buffer space for one byte?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list