summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dbus-cleanup-sockets.c2
-rw-r--r--tools/dbus-launch-win.c2
-rw-r--r--tools/dbus-launch-x11.c2
-rw-r--r--tools/dbus-launch.c2
-rw-r--r--tools/dbus-launch.h2
-rw-r--r--tools/dbus-monitor.17
-rw-r--r--tools/dbus-monitor.c56
-rw-r--r--tools/dbus-print-message.c2
-rw-r--r--tools/dbus-print-message.h2
-rw-r--r--tools/dbus-send.c2
-rw-r--r--tools/dbus-uuidgen.c2
-rw-r--r--tools/dbus-viewer.c2
12 files changed, 65 insertions, 18 deletions
diff --git a/tools/dbus-cleanup-sockets.c b/tools/dbus-cleanup-sockets.c
index fd24fc0c..487c4b07 100644
--- a/tools/dbus-cleanup-sockets.c
+++ b/tools/dbus-cleanup-sockets.c
@@ -19,7 +19,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <config.h>
diff --git a/tools/dbus-launch-win.c b/tools/dbus-launch-win.c
index 4d563191..cc936a6c 100644
--- a/tools/dbus-launch-win.c
+++ b/tools/dbus-launch-win.c
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <windows.h>
diff --git a/tools/dbus-launch-x11.c b/tools/dbus-launch-x11.c
index b1824181..56d7f744 100644
--- a/tools/dbus-launch-x11.c
+++ b/tools/dbus-launch-x11.c
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "dbus-launch.h"
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index 9c47d7e3..912afba8 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "dbus-launch.h"
diff --git a/tools/dbus-launch.h b/tools/dbus-launch.h
index 74788793..d0d0617d 100644
--- a/tools/dbus-launch.h
+++ b/tools/dbus-launch.h
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
diff --git a/tools/dbus-monitor.1 b/tools/dbus-monitor.1
index 5dea4ac8..c24c14d9 100644
--- a/tools/dbus-monitor.1
+++ b/tools/dbus-monitor.1
@@ -8,7 +8,7 @@ dbus-monitor \- debug probe to print message bus messages
.SH SYNOPSIS
.PP
.B dbus-monitor
-[\-\-system | \-\-session] [\-\-profile | \-\-monitor]
+[\-\-system | \-\-session | \-\-address ADDRESS] [\-\-profile | \-\-monitor]
[watch expressions]
.SH DESCRIPTION
@@ -37,7 +37,7 @@ and monitoring output format respectively. If neither is specified,
.PP
In order to get \fIdbus-monitor\fP to see the messages you are interested
in, you should specify a set of watch expressions as you would expect to
-be passed to the \fIdbus_bus_add_watch\fP function.
+be passed to the \fIdbus_bus_add_match\fP function.
.PP
The message bus configuration may keep \fIdbus-monitor\fP from seeing
@@ -51,6 +51,9 @@ Monitor the system message bus.
.I "--session"
Monitor the session message bus. (This is the default.)
.TP
+.I "--address ADDRESS"
+Monitor an arbitrary message bus given at ADDRESS.
+.TP
.I "--profile"
Use the profiling output format.
.TP
diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c
index cbd7a489..873108bc 100644
--- a/tools/dbus-monitor.c
+++ b/tools/dbus-monitor.c
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -191,7 +191,7 @@ profile_filter_func (DBusConnection *connection,
static void
usage (char *name, int ecode)
{
- fprintf (stderr, "Usage: %s [--system | --session] [--monitor | --profile ] [watch expressions]\n", name);
+ fprintf (stderr, "Usage: %s [--system | --session | --address ADDRESS] [--monitor | --profile ] [watch expressions]\n", name);
exit (ecode);
}
@@ -210,7 +210,8 @@ main (int argc, char *argv[])
DBusError error;
DBusBusType type = DBUS_BUS_SESSION;
DBusHandleMessageFunction filter_func = monitor_filter_func;
-
+ char *address = NULL;
+
int i = 0, j = 0, numFilters = 0;
char **filters = NULL;
for (i = 1; i < argc; i++)
@@ -221,6 +222,16 @@ main (int argc, char *argv[])
type = DBUS_BUS_SYSTEM;
else if (!strcmp (arg, "--session"))
type = DBUS_BUS_SESSION;
+ else if (!strcmp (arg, "--address"))
+ {
+ if (i+1 < argc)
+ {
+ address = argv[i+1];
+ i++;
+ }
+ else
+ usage (argv[0], 1);
+ }
else if (!strcmp (arg, "--help"))
usage (argv[0], 0);
else if (!strcmp (arg, "--monitor"))
@@ -241,11 +252,44 @@ main (int argc, char *argv[])
}
dbus_error_init (&error);
- connection = dbus_bus_get (type, &error);
+
+ if (address != NULL)
+ {
+ connection = dbus_connection_open (address, &error);
+ if (connection)
+ {
+ if (!dbus_bus_register (connection, &error))
+ {
+ fprintf (stderr, "Failed to register connection to bus at %s: %s\n",
+ address, error.message);
+ dbus_error_free (&error);
+ exit (1);
+ }
+ }
+ }
+ else
+ connection = dbus_bus_get (type, &error);
if (connection == NULL)
{
- fprintf (stderr, "Failed to open connection to %s message bus: %s\n",
- (type == DBUS_BUS_SYSTEM) ? "system" : "session",
+ const char *where;
+ if (address != NULL)
+ where = address;
+ else
+ {
+ switch (type)
+ {
+ case DBUS_BUS_SYSTEM:
+ where = "system bus";
+ break;
+ case DBUS_BUS_SESSION:
+ where = "session bus";
+ break;
+ default:
+ where = "";
+ }
+ }
+ fprintf (stderr, "Failed to open connection to %s: %s\n",
+ where,
error.message);
dbus_error_free (&error);
exit (1);
diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c
index ea15769f..335aa3dc 100644
--- a/tools/dbus-print-message.c
+++ b/tools/dbus-print-message.c
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "dbus-print-message.h"
diff --git a/tools/dbus-print-message.h b/tools/dbus-print-message.h
index 2f9bf8ef..26700d84 100644
--- a/tools/dbus-print-message.h
+++ b/tools/dbus-print-message.h
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef DBUS_PRINT_MESSAGE_H
diff --git a/tools/dbus-send.c b/tools/dbus-send.c
index 81a9c372..c9c9be27 100644
--- a/tools/dbus-send.c
+++ b/tools/dbus-send.c
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
diff --git a/tools/dbus-uuidgen.c b/tools/dbus-uuidgen.c
index 6801dcea..c8ba1cf7 100644
--- a/tools/dbus-uuidgen.c
+++ b/tools/dbus-uuidgen.c
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
diff --git a/tools/dbus-viewer.c b/tools/dbus-viewer.c
index 3a550ac4..2fd28474 100644
--- a/tools/dbus-viewer.c
+++ b/tools/dbus-viewer.c
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <config.h>