1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
- |
-From e90798c142dedc4fd296936b69fe34a40d0aa35a Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode@redhat.com>
+From e90798c142dedc4fd296936b69fe34a40d0aa35a Mon Sep 17 00:00:00 2001
+From: Ray Strode
Date: Fri, 10 Apr 2015 14:19:50 -0400
Subject: [PATCH] systemd-logind: filter out non-signal messages from message
filter
@@ -157,24 +14,24 @@
non-signal messages, including spurious message replies.
https://bugzilla.redhat.com/show_bug.cgi?id=1209347
----
+---
hw/xfree86/os-support/linux/systemd-logind.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
index 49758f4..57c87c0 100644
---- a/hw/xfree86/os-support/linux/systemd-logind.c
-+++ b/hw/xfree86/os-support/linux/systemd-logind.c
-@@ -286,60 +286,63 @@ systemd_logind_ack_pause(struct systemd_logind_info *info,
+--- a/hw/xfree86/os-support/linux/systemd-logind.c
++++ b/hw/xfree86/os-support/linux/systemd-logind.c
+@@ -286,60 +286,63 @@ systemd_logind_ack_pause(struct systemd_logind_info *info,
DBUS_TYPE_INVALID)) {
- LogMessage(X_ERROR, "systemd-logind: out of memory\n");
+ LogMessage(X_ERROR, "systemd-logind: out of memory\n");
goto cleanup;
}
- reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
- DBUS_TIMEOUT, &error);
+ reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
+ DBUS_TIMEOUT, &error);
if (!reply)
- LogMessage(X_ERROR, "systemd-logind: failed to ack pause: %s\n",
+ LogMessage(X_ERROR, "systemd-logind: failed to ack pause: %s\n",
error.message);
cleanup:
@@ -182,7 +39,7 @@
dbus_message_unref(msg);
if (reply)
dbus_message_unref(reply);
- dbus_error_free(&error);
+ dbus_error_free(&error);
}
static DBusHandlerResult
@@ -196,51 +53,38 @@
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_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++
+ dbus_error_init(&error);
if (dbus_message_is_signal(message,
- "org.freedesktop.DBus", "NameOwnerChanged")) {
+ "org.freedesktop.DBus", "NameOwnerChanged")) {
char *name, *old_owner, *new_owner;
- dbus_message_get_args(message, &error,
- DBUS_TYPE_STRING, &name,
- DBUS_TYPE_STRING, &old_owner,
- DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID);
- if (dbus_error_is_set(&error)) {
- LogMessage(X_ERROR, "systemd-logind: NameOwnerChanged: %s\n",
+ dbus_message_get_args(message, &error,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_STRING, &old_owner,
+ DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID);
+ if (dbus_error_is_set(&error)) {
+ LogMessage(X_ERROR, "systemd-logind: NameOwnerChanged: %s\n",
error.message);
- dbus_error_free(&error);
+ dbus_error_free(&error);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- if (name && strcmp(name, "org.freedesktop.login1") == 0)
- FatalError("systemd-logind disappeared (stopped/restarted?)\n");
+ if (name && strcmp(name, "org.freedesktop.login1") == 0)
+ FatalError("systemd-logind disappeared (stopped/restarted?)\n");
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- if (strcmp(dbus_message_get_path(message), info->session) != 0)
+ if (strcmp(dbus_message_get_path(message), info->session) != 0)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- if (dbus_message_is_signal(message, "org.freedesktop.login1.Session",
- "PauseDevice")) {
- if (!dbus_message_get_args(message, &error,
- DBUS_TYPE_UINT32, &major,
---
-2.3.3
-
|