[libnet-dbus-perl] 217/335: Fixed service name for dbus object. Ensure return value from signal filter is passed back to dbus
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 21 01:08:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.
commit cd75b4dbb173b05e212c17b969f494a39c18315c
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Sun Jul 16 18:32:02 2006 -0400
Fixed service name for dbus object. Ensure return value from signal filter is passed back to dbus
---
CHANGES | 8 ++++++++
DBus.xs | 14 +++++---------
lib/Net/DBus.pm | 5 ++---
lib/Net/DBus/Binding/Connection.pm | 2 +-
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/CHANGES b/CHANGES
index 6288b75..2079d76 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+Changes since 0.33.3
+
+ - Fixed service owner used for org.freedesktop.DBus object
+ to make signal handling on the bus work again
+
+ - Pass return value for signal handling callbacks all the
+ way back to DBus
+
Changes since 0.33.2
- Fixed parsing of introspection data if there are processing
diff --git a/DBus.xs b/DBus.xs
index 9da25af..a921865 100644
--- a/DBus.xs
+++ b/DBus.xs
@@ -254,14 +254,14 @@ _message_filter(DBusConnection *con,
PUTBACK;
count = call_method("_message_filter", G_SCALAR);
- /* XXX POPi prints use of uninitialized value ?!?!?! */
-if (0) {
+ SPAGAIN;
if (count == 1) {
handled = POPi;
} else {
handled = 0;
}
-}
+ PUTBACK;
+ PD_DEBUG("Handled %d %d\n", count, handled);
FREETMPS;
LEAVE;
@@ -524,8 +524,6 @@ _send_with_reply_and_block(con, msg, timeout)
PD_DEBUG(" Interface %s\n", dbus_message_get_interface(reply) ? dbus_message_get_interface(reply) : "");
PD_DEBUG(" Path %s\n", dbus_message_get_path(reply) ? dbus_message_get_path(reply) : "");
PD_DEBUG(" Member %s\n", dbus_message_get_member(reply) ? dbus_message_get_member(reply) : "");
- // XXX needed ?
- //dbus_message_ref(reply);
RETVAL = reply;
OUTPUT:
RETVAL
@@ -543,8 +541,6 @@ _send_with_reply(con, msg, timeout)
croak("not enough memory to send message");
}
PD_DEBUG("Create pending call %p\n", reply);
- // XXX needed ?
- //dbus_pending_call_ref(reply);
RETVAL = reply;
OUTPUT:
RETVAL
@@ -571,7 +567,9 @@ void
_dispatch(con)
DBusConnection *con;
CODE:
+ PD_DEBUG("IN dispatch\n");
while(dbus_connection_dispatch(con) == DBUS_DISPATCH_DATA_REMAINS);
+ PD_DEBUG("Completed \n");
void
_set_watch_callbacks(con)
@@ -707,8 +705,6 @@ DESTROY(con)
CODE:
PD_DEBUG("Destroying connection %p\n", con);
dbus_connection_disconnect(con);
- // XXX do we need this or not ?
- //dbus_connection_unref(con);
MODULE = Net::DBus::Binding::Server PACKAGE = Net::DBus::Binding::Server
diff --git a/lib/Net/DBus.pm b/lib/Net/DBus.pm
index 0de90ae..f44d9b9 100644
--- a/lib/Net/DBus.pm
+++ b/lib/Net/DBus.pm
@@ -250,10 +250,9 @@ sub _new {
# ... Add support for GLib and POE
}
- $self->get_connection->add_filter(sub { $self->_signal_func(@_) });
+ $self->get_connection->add_filter(sub { return $self->_signal_func(@_); });
- # XXX is it ok to fix '1:0' as the owner of this ?
- $self->{bus} = Net::DBus::RemoteService->new($self, ":1.0", "org.freedesktop.DBus");
+ $self->{bus} = Net::DBus::RemoteService->new($self, "org.freedesktop.DBus", "org.freedesktop.DBus");
return $self;
}
diff --git a/lib/Net/DBus/Binding/Connection.pm b/lib/Net/DBus/Binding/Connection.pm
index 6c15c0f..36b0ba0 100644
--- a/lib/Net/DBus/Binding/Connection.pm
+++ b/lib/Net/DBus/Binding/Connection.pm
@@ -555,7 +555,7 @@ sub make_error_message {
my $replyto = shift;
my $name = shift;
my $description = shift;
- print "Fsck $name $description\n";
+
return Net::DBus::Binding::Message::Error->new(replyto => $replyto,
name => $name,
description => $description);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git
More information about the Pkg-perl-cvs-commits
mailing list