systemd-logind: filter out non-signal messages from message filter
It's possible to receive a message reply in the message filter if a
previous message call timed out locally before the reply arrived.
The message_filter function only handles signals, at the moment, and
does not properly handle message replies.
This commit changes the message_filter function to filter out all
non-signal messages, including spurious message replies.
Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 792e925167
)
This commit is contained in:
parent
2c818e7b5d
commit
bb5a8da756
|
@ -313,6 +313,9 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
|
|||
dbus_int32_t major, minor;
|
||||
char *pause_str;
|
||||
|
||||
if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
if (dbus_message_is_signal(message,
|
||||
|
|
Loading…
Reference in New Issue
Block a user