GUnixSocketAddress: handle abstract sockets with non-0-padded names
authorDan Winship <danw@gnome.org>
Tue, 20 Apr 2010 21:23:49 +0000 (17:23 -0400)
committerDan Winship <danw@gnome.org>
Thu, 22 Apr 2010 15:54:41 +0000 (11:54 -0400)
commit19d8cc33759e38a7cfcf7ddaa2e80e7c4ddc2d3c
treeb39d556494a3982a4540dd2abd51a0c4d96a7469
parent5e892de8afaf564838910f11bdc383ab441417ca
GUnixSocketAddress: handle abstract sockets with non-0-padded names

There are apparently two incompatible ways of naming abstract sockets:
pad the sockaddr with 0s and use the entire thing as the name, or else
don't, and just pass a shorter length value to the relevant functions.
We previously only supported the former method. Add support for the
latter.

Also correctly handle "anonymous" unix sockaddrs (eg, the client side
of a connection, or a socketpair() socket), and add unix domain socket
support to the socket-client and socket-server test programs to make
sure this all works.

https://bugzilla.gnome.org/show_bug.cgi?id=615960
docs/reference/gio/gio-sections.txt
gio/gio.symbols
gio/gioenums.h
gio/gsocketaddress.c
gio/gunixsocketaddress.c
gio/gunixsocketaddress.h
gio/tests/Makefile.am
gio/tests/socket-client.c
gio/tests/socket-common.c [new file with mode: 0644]
gio/tests/socket-server.c
gio/tests/unix-fd.c