--- tools/dbus-send.c.address 2008-04-10 12:16:59.000000000 -0500 +++ tools/dbus-send.c 2008-04-10 13:13:37.000000000 -0500 @@ -228,7 +228,10 @@ appname = argv[0]; if (argc < 3) - usage (1); + { + fprintf (stderr, "Too few arguments\n"); + usage (1); + } print_reply = FALSE; print_reply_literal = FALSE; @@ -286,8 +289,17 @@ usage (1); } + if (path == NULL) + { + fprintf (stderr, "Missing destination object path\n"); + usage (1); + } + if (name == NULL) - usage (1); + { + fprintf (stderr, "Missing message name\n"); + usage (1); + } if (session_or_system && (address != NULL)) @@ -306,6 +318,14 @@ type_str); exit (1); } + + if (print_reply && + (message_type != DBUS_MESSAGE_TYPE_METHOD_CALL)) + { + fprintf (stderr, "\"--print-reply\" implies \"--type=method_call\"\n"); + exit (1); + } + } dbus_error_init (&error);