From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E25EE138CE3 for ; Sun, 9 Feb 2014 18:56:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ACAD7E0B3E; Sun, 9 Feb 2014 18:56:42 +0000 (UTC) Received: from michel.telenet-ops.be (michel.telenet-ops.be [195.130.137.88]) by pigeon.gentoo.org (Postfix) with ESMTP id 9EEB3E0B3A for ; Sun, 9 Feb 2014 18:56:41 +0000 (UTC) Received: from TOMWIJ-GENTOO ([94.226.55.127]) by michel.telenet-ops.be with bizsmtp id QJwg1n00B2khLEN06JwgMj; Sun, 09 Feb 2014 19:56:40 +0100 Date: Sun, 9 Feb 2014 19:55:01 +0100 From: Tom Wijsman To: lists@webconect.ch Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Bug #494552: libnotify Message-ID: <20140209195501.6c4a5fde@TOMWIJ-GENTOO> In-Reply-To: <20140209152834.GA2257@hp-workstation.v.cablecom.net> References: <20140209152834.GA2257@hp-workstation.v.cablecom.net> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.22; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 9067f49e-c5dc-4338-8d22-23e736454bd1 X-Archives-Hash: 46c09e084e5084db56ba2b46a08197fb On Sun, 9 Feb 2014 16:28:34 +0100 Elias Diem wrote: > Hi all > > Is there any way I can help with fixing this bug? > > https://bugs.gentoo.org/show_bug.cgi?id=494552 > > -- > Greetings > Elias Diem You can report this upstream at the GNOME Bugzilla; then make sure that both bugs link to each other, such that they track each other. If you know or learn how to code, you can take it a step further: === Sending the dbus notification (is OK!) === The expiration time variable is made in https://git.gnome.org/browse/libnotify/tree/tools/notify-send.c?id=0.7.5#n135 and it is set in https://git.gnome.org/browse/libnotify/tree/tools/notify-send.c?id=0.7.5#n146 after which 'notify_notification_set_timeout' is called on an 'notify' object in https://git.gnome.org/browse/libnotify/tree/tools/notify-send.c?id=0.7.5#n231 which all seems fine. We need to look further at what the 'notify_notification_set_timeout' implementation does at https://git.gnome.org/browse/libnotify/tree/libnotify/notification.c?id=0.7.5#n637 which sets notification->priv->timeout which is then used in notify_notification_show in a dbus call at https://git.gnome.org/browse/libnotify/tree/libnotify/notification.c?id=0.7.5#n596 and the relevant '_notify_notification_get_timeout' below it seems fine too, which is used once in https://git.gnome.org/browse/libnotify/tree/libnotify/notify.c?id=0.7.5#n176 but due to the lack of small functions and/or documentation it is unclear what it is trying to do here. But since this last bit is the uninit code I'm in doubt if that's where the fault would lie. Before digging in that code I'd rather suggest we look at what the notification daemon does with the notification it receives through dbus and what it does with the received timeout parameter. === Receiving the dbus notification (is NOT OK, unused!) === The expiration time variable is again made in https://git.gnome.org/browse/notification-daemon/tree/src/daemon.c?id=0.7.6#n183 where it is received in https://git.gnome.org/browse/notification-daemon/tree/src/daemon.c?id=0.7.6#n192 and then the notification is updated in https://git.gnome.org/browse/notification-daemon/tree/src/daemon.c?id=0.7.6#n218 by calling https://git.gnome.org/browse/notification-daemon/tree/src/nd-notification.c?id=0.7.6#n153 Now, as you read through the function; or rather, grep for the timeout variable you'll see that it is not set in the function; a possible fix might be to put notification->timeout = timeout; somewhere in the function. Though, when doing so; I'm in doubt if it is used at all. So, when we grep the log we get https://git.gnome.org/browse/notification-daemon/log/src?qt=grep&q=timeout where we can see they are using some kind of NotifyTimeout class to accomplish timeouts. It might be that the timeout parameter needs to passed into some class; but for these details, some reading up on the documentation of those classes as well as the implementation of this design needs to be done to understand what is going on or what is supposed to be going on. Take home lesson: "How did this get released with an unused parameter?" -- With kind regards, Tom Wijsman (TomWij) Gentoo Developer E-mail address : TomWij@gentoo.org GPG Public Key : 6D34E57D GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D