Bugzilla – Attachment 317415 Details for
Bug 537401
DBUS communication hangs with PackageKit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
ruby-dbus-debug.diff
ruby-dbus-debug.diff (text/plain), 2.14 KB, created by
Martin Vidner
on 2009-09-09 13:56:47 UTC
(
hide
)
Description:
ruby-dbus-debug.diff
Filename:
MIME Type:
Creator:
Martin Vidner
Created:
2009-09-09 13:56:47 UTC
Size:
2.14 KB
patch
obsolete
>diff --git a/lib/dbus/bus.rb b/lib/dbus/bus.rb >index 1ac2e6b..1264883 100644 >--- a/lib/dbus/bus.rb >+++ b/lib/dbus/bus.rb >@@ -12,6 +12,10 @@ require 'socket' > require 'thread' > require 'singleton' > >+def dputs(s) >+ puts "#{$$} #{s}" if $DEBUG >+end >+ > # = D-Bus main module > # > # Module containing all the D-Bus modules and classes. >@@ -400,7 +404,14 @@ module DBus > # Fill (append) the buffer from data that might be available on the > # socket. > def update_buffer >+dputs "UB" > @buffer += @socket.read_nonblock(MSG_BUF_SIZE) >+dputs @buffer >+dputs hexdump @buffer >+ end >+ >+ def hexdump(s) >+ s.unpack('c*').map{|i| "%02X" % i}.join ":" > end > > # Get one message from the bus and remove it from the buffer. >@@ -413,6 +424,7 @@ module DBus > rescue IncompleteBufferException => e > # fall through, let ret be null > end >+dputs "POPPED #{ret}" > ret > end > >@@ -531,9 +543,11 @@ module DBus > obj.dispatch(m) if obj > end > when DBus::Message::SIGNAL >+dputs "PROCESSING SIGNAL #{m}" > @signal_matchrules.each do |elem| > mr, slot = elem > if mr.match(m) >+dputs "MATCH" > slot.call(m) > return > end >@@ -689,7 +703,9 @@ module DBus > end > end > while not @quitting and not @buses.empty? >+dputs "SELECTING" > ready, dum, dum = IO.select(@buses.keys) >+dputs "SELECTED" > ready.each do |socket| > b = @buses[socket] > begin >@@ -698,6 +714,7 @@ module DBus > @buses.delete socket # this bus died > next > end >+dputs "WILL POP" > while m = b.pop_message > b.process(m) > end >diff --git a/lib/dbus/message.rb b/lib/dbus/message.rb >index 4652dec..3ea7f8b 100644 >--- a/lib/dbus/message.rb >+++ b/lib/dbus/message.rb >@@ -101,6 +101,12 @@ module DBus > end > end > >+ def to_s >+ hid = "%#x" % object_id >+ s = "#<#{self.class}@#{hid} #{message_type}:#{member}>" >+ s >+ end >+ > # Mark this message as a reply to a another message _m_, taking > # the serial number of _m_ as reply serial and the sender of _m_ as > # destination.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 537401
: 317415