[Spice-devel] [vdagent-linux v4 2/7] console-kit: Ignore unrequested messages from dbus

Jonathon Jongsma jjongsma at redhat.com
Tue May 3 16:38:52 UTC 2016


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Tue, 2016-05-03 at 13:01 +0200, Victor Toso wrote:
> Instead of treating them as errors.
> ---
>  src/console-kit.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/src/console-kit.c b/src/console-kit.c
> index d4eecd7..c7e60df 100644
> --- a/src/console-kit.c
> +++ b/src/console-kit.c
> @@ -109,12 +109,6 @@ si_dbus_read_signals(struct session_info *info)
>      while (message != NULL) {
>          const char *member;
>  
> -        if (dbus_message_get_type(message) != DBUS_MESSAGE_TYPE_SIGNAL) {
> -            syslog(LOG_WARNING, "(console-kit) received non signal message");
> -            dbus_message_unref(message);
> -            break;
> -        }
> -
>          member = dbus_message_get_member (message);
>          if (g_strcmp0(member, SEAT_SIGNAL_ACTIVE_SESSION_CHANGED) == 0) {
>              DBusMessageIter iter;
> @@ -142,8 +136,12 @@ si_dbus_read_signals(struct session_info *info)
>                         "ActiveSessionChanged message has unexpected type:
> '%c'",
>                         type);
>              }
> -        } else if (info->verbose) {
> -            syslog(LOG_DEBUG, "(console-kit) Signal not handled: %s",
> member);
> +        } else {
> +            if (dbus_message_get_type(message) != DBUS_MESSAGE_TYPE_SIGNAL) {
> +                syslog(LOG_WARNING, "(console-kit) received non signal
> message");
> +            } else if (info->verbose) {
> +                syslog(LOG_DEBUG, "(console-kit) Signal not handled: %s",
> member);
> +            }
>          }
>  
>          dbus_message_unref(message);


More information about the Spice-devel mailing list