mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-14 12:08:08 +02:00
dbus-send: Print an error message if object path is syntactically invalid
$ dbus-send // nope
Object path was not valid: '//'
Related to dbus#338.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
ef55a3db0d
commit
dde5c8fdc4
1 changed files with 7 additions and 0 deletions
|
|
@ -417,6 +417,13 @@ main (int argc, char *argv[])
|
|||
usage (1);
|
||||
}
|
||||
|
||||
if (!dbus_validate_path (path, &error))
|
||||
{
|
||||
fprintf (stderr, "%s\n", error.message);
|
||||
dbus_error_free (&error);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (address != NULL)
|
||||
{
|
||||
connection = dbus_connection_open (address, &error);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue