[libnet-dbus-perl] 240/335: Don't complain about variant data type mismatches
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 21 01:08:04 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 c3d63698738cfbb5208f791f01dd3f40b1d3e8ec
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Sun Feb 4 12:03:45 2007 -0500
Don't complain about variant data type mismatches
---
lib/Net/DBus/Binding/Iterator.pm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/Net/DBus/Binding/Iterator.pm b/lib/Net/DBus/Binding/Iterator.pm
index 4ff4bae..d30c8f2 100644
--- a/lib/Net/DBus/Binding/Iterator.pm
+++ b/lib/Net/DBus/Binding/Iterator.pm
@@ -225,16 +225,19 @@ sub get {
if ($actual != $type) {
# "Be strict in what you send, be leniant in what you accept"
# - ie can't rely on python to send correct types, eg int32 vs uint32
- #die "requested type '" . chr($type) . "' ($type) did not match wire type '" . chr($actual) . "' ($actual)";
- warn "requested type '" . chr($type) . "' ($type) did not match wire type '" . chr($actual) . "' ($actual)";
+ # But, don't complain for variants because a number of apps (eg HAL)
+ # claim to return variants, but in fact don't correctly encode their
+ # data as variants. Technically a bug in the server, but it does
+ # 'just work' normally.
+ warn "requested type '" . chr($type) . "' ($type) did not match wire type '" . chr($actual) . "' ($actual)"
+ if $type != &Net::DBus::Binding::Message::TYPE_VARIANT;
+
$type = $actual;
}
} else {
$type = $self->get_arg_type;
}
-
-
if ($type == &Net::DBus::Binding::Message::TYPE_STRING) {
return $self->get_string;
} elsif ($type == &Net::DBus::Binding::Message::TYPE_BOOLEAN) {
--
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