mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 05:48:01 +02:00
Remove duplicate nonce-tcp (client side) transport on Windows
_dbus_transport_open_socket is called before _dbus_transport_open_platform_specific, and now handles nonce-tcp, so this version is no longer useful. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45896 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Tested-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
parent
e48de6be84
commit
ad7245627c
1 changed files with 2 additions and 33 deletions
|
|
@ -51,39 +51,8 @@ _dbus_transport_open_platform_specific (DBusAddressEntry *entry,
|
|||
DBusTransport **transport_p,
|
||||
DBusError *error)
|
||||
{
|
||||
const char *method;
|
||||
|
||||
const char *host = dbus_address_entry_get_value (entry, "host");
|
||||
const char *port = dbus_address_entry_get_value (entry, "port");
|
||||
const char *family = dbus_address_entry_get_value (entry, "family");
|
||||
const char *noncefile = dbus_address_entry_get_value (entry, "noncefile");
|
||||
|
||||
method = dbus_address_entry_get_method (entry);
|
||||
_dbus_assert (method != NULL);
|
||||
|
||||
if (strcmp (method, "nonce-tcp") != 0)
|
||||
{
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
return DBUS_TRANSPORT_OPEN_NOT_HANDLED;
|
||||
}
|
||||
|
||||
if (port == NULL)
|
||||
{
|
||||
_dbus_set_bad_address (error, "nonce-tcp", "port", NULL);
|
||||
return DBUS_TRANSPORT_OPEN_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
*transport_p = _dbus_transport_new_for_tcp_socket (host, port, family, noncefile, error);
|
||||
if (*transport_p == NULL)
|
||||
{
|
||||
_DBUS_ASSERT_ERROR_IS_SET (error);
|
||||
return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT;
|
||||
}
|
||||
else
|
||||
{
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
return DBUS_TRANSPORT_OPEN_OK;
|
||||
}
|
||||
/* currently no Windows-specific transports */
|
||||
return DBUS_TRANSPORT_OPEN_NOT_HANDLED;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue