From: Tom Wijsman <TomWij@gentoo.org>
To: lists@webconect.ch
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Bug #494552: libnotify
Date: Sun, 9 Feb 2014 19:55:01 +0100 [thread overview]
Message-ID: <20140209195501.6c4a5fde@TOMWIJ-GENTOO> (raw)
In-Reply-To: <20140209152834.GA2257@hp-workstation.v.cablecom.net>
On Sun, 9 Feb 2014 16:28:34 +0100
Elias Diem <lists@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 : TomWij@gentoo.org
GPG Public Key : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D
next prev parent reply other threads:[~2014-02-09 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-09 15:28 [gentoo-dev] Bug #494552: libnotify Elias Diem
2014-02-09 18:55 ` Tom Wijsman [this message]
2014-02-13 17:11 ` Elias Diem
2014-02-10 6:47 ` Samuli Suominen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140209195501.6c4a5fde@TOMWIJ-GENTOO \
--to=tomwij@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=lists@webconect.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox