diff options
author | Havoc Pennington <hp@redhat.com> | 2006-09-16 17:38:24 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2006-09-16 17:38:24 +0000 |
commit | 8027efc97b4bec85f674570f878919cb72456745 (patch) | |
tree | 441ffafa5367bdb93c8bfa7f8ec51acfeb432b0b /dbus/dbus-connection.c | |
parent | a0a12210e1f5aa5bd185a57d4394b8eb51cbe472 (diff) |
voc Pennington <hp@redhat.com>
* dbus/dbus-server.c (dbus_server_listen): change how this works
to be able to delegate to a set of handlers that can succeed,
fail, or choose not to handle. Allows us to have
dbus_server_listen_platform_specific.
* dbus/dbus-server-socket.c (_dbus_server_new_for_tcp_socket):
factor out the tcp socket stuff to be used on windows, leaving
unix domain socket only in dbus-socket-unix.c
* dbus/dbus-transport-socket.c
(_dbus_transport_new_for_tcp_socket): factor out the tcp socket
stuff to be used on windows, leaving unix domain socket only
in dbus-transport-unix.c
* dbus/dbus-connection.c (dbus_connection_get_unix_user): insert
temporary hack to be sure this fails on windows
(dbus_connection_get_unix_process_id): ditto
Diffstat (limited to 'dbus/dbus-connection.c')
-rw-r--r-- | dbus/dbus-connection.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index a9755131..be88e320 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -4224,6 +4224,9 @@ dbus_connection_set_dispatch_status_function (DBusConnection *connec * connections will have a file descriptor. So for adding descriptors * to the main loop, use dbus_watch_get_fd() and so forth. * + * @todo this function should be called get_socket_fd or something; + * there's no reason it can't work on Windows sockets also. + * * @param connection the connection * @param fd return location for the file descriptor. * @returns #TRUE if fd is successfully obtained. @@ -4239,8 +4242,8 @@ dbus_connection_get_unix_fd (DBusConnection *connection, CONNECTION_LOCK (connection); - retval = _dbus_transport_get_unix_fd (connection->transport, - fd); + retval = _dbus_transport_get_socket_fd (connection->transport, + fd); CONNECTION_UNLOCK (connection); @@ -4266,6 +4269,14 @@ dbus_connection_get_unix_user (DBusConnection *connection, _dbus_return_val_if_fail (connection != NULL, FALSE); _dbus_return_val_if_fail (uid != NULL, FALSE); + +#ifdef DBUS_WIN + /* FIXME this should be done at a lower level, but it's kind of hard, + * just want to be sure we don't ship with this API returning + * some weird internal fake uid for 1.0 + */ + return FALSE; +#endif CONNECTION_LOCK (connection); @@ -4297,6 +4308,14 @@ dbus_connection_get_unix_process_id (DBusConnection *connection, _dbus_return_val_if_fail (connection != NULL, FALSE); _dbus_return_val_if_fail (pid != NULL, FALSE); + +#ifdef DBUS_WIN + /* FIXME this should be done at a lower level, but it's kind of hard, + * just want to be sure we don't ship with this API returning + * some weird internal fake uid for 1.0 + */ + return FALSE; +#endif CONNECTION_LOCK (connection); |