On Sun, 9 Feb 2014 16:28:34 +0100
Elias Diem <li...@webconect.ch> 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  : tom...@gentoo.org
GPG Public Key  : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2  ABF0 95B2 1FCD 6D34 E57D

Reply via email to