diff options
Diffstat (limited to 'tools/dbus-send.c')
| -rw-r--r-- | tools/dbus-send.c | 8 | 
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/dbus-send.c b/tools/dbus-send.c index 06a87adb..d0cca2fd 100644 --- a/tools/dbus-send.c +++ b/tools/dbus-send.c @@ -86,11 +86,9 @@ main (int argc, char *argv[])    if (type_str != NULL)      { -      if (strcmp (type_str, "method_call") == 0) -        message_type = DBUS_MESSAGE_TYPE_METHOD_CALL; -      else if (strcmp (type_str, "signal") == 0) -        message_type = DBUS_MESSAGE_TYPE_SIGNAL; -      else +      message_type = dbus_message_type_from_string (type_str); +      if (!(message_type == DBUS_MESSAGE_TYPE_METHOD_CALL || +            message_type == DBUS_MESSAGE_TYPE_SIGNAL))          {            fprintf (stderr, "Message type \"%s\" is not supported\n",                     type_str);  | 
