Commit ecdcb86b authored by Simon McVittie's avatar Simon McVittie

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's avatarSimon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257
parent 2ee52a6a
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment