mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 06:28:00 +02:00
2004-05-27 Seth Nickell <seth@gnome.org>
* python/dbus.py: * python/dbus_bindings.pyx.in: Fix failure to notify that a signal was not handled, resulted in hung functions.
This commit is contained in:
parent
aa54f14c05
commit
9e262d565e
3 changed files with 14 additions and 2 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2004-05-27 Seth Nickell <seth@gnome.org>
|
||||
|
||||
* python/dbus.py:
|
||||
* python/dbus_bindings.pyx.in:
|
||||
|
||||
Fix failure to notify that a signal was not handled,
|
||||
resulted in hung functions.
|
||||
|
||||
2004-05-25 Colin Walters <walters@redhat.com>
|
||||
|
||||
* tools/dbus-monitor.c (main): Monitor all types of messages.
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ class Bus:
|
|||
TYPE_SYSTEM = dbus_bindings.BUS_SYSTEM
|
||||
TYPE_ACTIVATION = dbus_bindings.BUS_ACTIVATION
|
||||
|
||||
"""bus_type=[Bus.TYPE_SESSION | Bus.TYPE_SYSTEM | Bus.TYPE_ACTIVATION]
|
||||
"""
|
||||
def __init__(self, bus_type=TYPE_SESSION, glib_mainloop=True):
|
||||
self._connection = dbus_bindings.bus_get(bus_type)
|
||||
|
||||
|
|
@ -100,7 +102,7 @@ class Bus:
|
|||
|
||||
def _signal_func(self, connection, message):
|
||||
if (message.get_type() != dbus_bindings.MESSAGE_TYPE_SIGNAL):
|
||||
return
|
||||
return dbus_bindings.HANDLER_RESULT_NOT_YET_HANDLED
|
||||
|
||||
interface = message.get_interface()
|
||||
service = message.get_sender()
|
||||
|
|
@ -114,7 +116,7 @@ class Bus:
|
|||
args = [interface, member, service, path, message]
|
||||
for receiver in receivers:
|
||||
receiver(*args)
|
||||
|
||||
|
||||
|
||||
class RemoteObject:
|
||||
"""A remote Object.
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ cdef DBusHandlerResult cmessage_function_handler (DBusConnection *connection,
|
|||
retval = function(*args)
|
||||
if (retval == None):
|
||||
retval = DBUS_HANDLER_RESULT_HANDLED
|
||||
|
||||
return retval
|
||||
|
||||
cdef class Connection:
|
||||
|
|
@ -644,6 +645,7 @@ cdef class MessageIter:
|
|||
|
||||
(MESSAGE_TYPE_INVALID, MESSAGE_TYPE_METHOD_CALL, MESSAGE_TYPE_METHOD_RETURN, MESSAGE_TYPE_ERROR, MESSAGE_TYPE_SIGNAL) = range(5)
|
||||
(TYPE_INVALID, TYPE_NIL, TYPE_BYTE, TYPE_BOOLEAN, TYPE_INT32, TYPE_UINT32, TYPE_INT64, TYPE_UINT64, TYPE_DOUBLE, TYPE_STRING, TYPE_CUSTOM, TYPE_ARRAY, TYPE_DICT, TYPE_OBJECT_PATH) = (0, ord('v'), ord('y'), ord('b'), ord('i'), ord('u'), ord('x'), ord('t'), ord('d'), ord('s'), ord('c'), ord('a'), ord('m'), ord('o'))
|
||||
(HANDLER_RESULT_HANDLED, HANDLER_RESULT_NOT_YET_HANDLED, HANDLER_RESULT_NEED_MEMORY) = range(3)
|
||||
|
||||
cdef class Message:
|
||||
cdef DBusMessage *msg
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue