mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-21 07:10:34 +01:00
transport: Don't pile up errors for semicolon-separated components
If we somehow get an autolaunch address with multiple semicolon-separated components, and one of them fails, then we will hit an assertion failure when we try the next one. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
This commit is contained in:
parent
2ee52a6a07
commit
ecdcb86bff
1 changed files with 3 additions and 0 deletions
|
|
@ -254,13 +254,16 @@ check_address (const char *address, DBusError *error)
|
|||
int len, i;
|
||||
|
||||
_dbus_assert (address != NULL);
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
|
||||
if (!dbus_parse_address (address, &entries, &len, error))
|
||||
return NULL; /* not a valid address */
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
dbus_error_free (error);
|
||||
transport = _dbus_transport_open (entries[i], error);
|
||||
|
||||
if (transport != NULL)
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue