[Bug 18530] Should implement IPv4 socket for file transfer

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 2 00:01:24 CET 2012


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

--- Comment #9 from Jonny Lamb <jonny.lamb at collabora.co.uk> 2012-03-01 15:01:24 PST ---
I reviewed the diff of master...tfischer/tdfischer/gsocket-file-xfer as that
was easier given the fixup patches later on. Don't be too afraid to squash
together some patches, which logically make sense to do so, before merging
this.

Anyway, yeah the branch looks pretty good, great work! I've just a few
nitpicks:

-static gboolean setup_local_socket (SalutFileTransferChannel *self);
+static gboolean setup_local_socket (SalutFileTransferChannel *self,
TpSocketAddressType address_type, guint access_control);

This line got quite long; one parameter per line please, like the rest of the
file.

  GUnixSocketAddress *addr = NULL;
  addr = (GUnixSocketAddress *) g_unix_socket_address_new (path);
  return (GSocketAddress *) addr;

If you made addr a GSocketAddress there wouldn't need to be any casting
necessary, no?

get_local_tcp_socket_address (SalutFileTransferChannel *self, GSocketFamily
family)

-get_socket_channel (SalutFileTransferChannel *self)
+get_socket_channel (SalutFileTransferChannel *self, TpSocketAddressType
address_type, guint access_control)

-setup_local_socket (SalutFileTransferChannel *self)
+setup_local_socket (SalutFileTransferChannel *self, TpSocketAddressType
address_type, guint access_control)

One parameter per line.

+        sock = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM,
G_SOCKET_PROTOCOL_DEFAULT, &error);

Lines should be around 70 characters maximum. This one looks quite long, etc.

+        self.ftProto = ftProtocol

ft_proto and ft_protocol please. Same holds for the rest of your changes to the
Python.

-- 
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