diff options
| author | Colin Walters <walters@verbum.org> | 2004-08-11 14:59:34 +0000 | 
|---|---|---|
| committer | Colin Walters <walters@verbum.org> | 2004-08-11 14:59:34 +0000 | 
| commit | fefa40496b425ea18e7a392bb62ded2de008e4e9 (patch) | |
| tree | dbec951781b075be5675c2f9182d30e0399eaf56 | |
| parent | eb37885909180e7e4c25e5337bec385082174dbd (diff) | |
2004-08-11  Colin Walters  <walters@redhat.com>
	* tools/dbus-send.c (main, usage): Add --reply-timeout
	argument.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | tools/dbus-send.c | 11 | 
2 files changed, 14 insertions, 2 deletions
| @@ -1,3 +1,8 @@ +2004-08-11  Colin Walters  <walters@redhat.com> + +	* tools/dbus-send.c (main, usage): Add --reply-timeout +	argument. +  2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>  	* bus/bus.c (process_config_first_time_only): get rid of an unused diff --git a/tools/dbus-send.c b/tools/dbus-send.c index 5ff9f576..81ecac7e 100644 --- a/tools/dbus-send.c +++ b/tools/dbus-send.c @@ -30,7 +30,7 @@  static void  usage (char *name, int ecode)  { -  fprintf (stderr, "Usage: %s [--help] [--system | --session] [--dest=SERVICE] [--type=TYPE] [--print-reply] <destination object path> <message name> [contents ...]\n", name); +  fprintf (stderr, "Usage: %s [--help] [--system | --session] [--dest=SERVICE] [--type=TYPE] [--print-reply] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]\n", name);    exit (ecode);  } @@ -41,6 +41,7 @@ main (int argc, char *argv[])    DBusError error;    DBusMessage *message;    int print_reply; +  int reply_timeout;    DBusMessageIter iter;    int i;    DBusBusType type = DBUS_BUS_SESSION; @@ -54,6 +55,7 @@ main (int argc, char *argv[])      usage (argv[0], 1);    print_reply = FALSE; +  reply_timeout = -1;    for (i = 1; i < argc && name == NULL; i++)      { @@ -68,6 +70,11 @@ main (int argc, char *argv[])  	  print_reply = TRUE;  	  message_type = DBUS_MESSAGE_TYPE_METHOD_CALL;  	} +      else if (strstr (arg, "--reply-timeout=") == arg) +	{ +	  reply_timeout = strtol (strchr (arg, '=') + 1, +				  NULL, 10); +	}        else if (strstr (arg, "--dest=") == arg)  	dest = strchr (arg, '=') + 1;        else if (strstr (arg, "--type=") == arg) @@ -254,7 +261,7 @@ main (int argc, char *argv[])        dbus_error_init (&error);        reply = dbus_connection_send_with_reply_and_block (connection, -                                                         message, -1, +                                                         message, reply_timeout,                                                           &error);        if (dbus_error_is_set (&error))          { | 
