1 |
On Sun, 9 Feb 2014 16:28:34 +0100 |
2 |
Elias Diem <lists@×××××××××.ch> wrote: |
3 |
|
4 |
> Hi all |
5 |
> |
6 |
> Is there any way I can help with fixing this bug? |
7 |
> |
8 |
> https://bugs.gentoo.org/show_bug.cgi?id=494552 |
9 |
> |
10 |
> -- |
11 |
> Greetings |
12 |
> Elias Diem |
13 |
|
14 |
You can report this upstream at the GNOME Bugzilla; then make sure that |
15 |
both bugs link to each other, such that they track each other. |
16 |
|
17 |
If you know or learn how to code, you can take it a step further: |
18 |
|
19 |
=== Sending the dbus notification (is OK!) === |
20 |
|
21 |
The expiration time variable is made in |
22 |
https://git.gnome.org/browse/libnotify/tree/tools/notify-send.c?id=0.7.5#n135 |
23 |
and it is set in |
24 |
https://git.gnome.org/browse/libnotify/tree/tools/notify-send.c?id=0.7.5#n146 |
25 |
after which 'notify_notification_set_timeout' is called on an |
26 |
'notify' object in |
27 |
https://git.gnome.org/browse/libnotify/tree/tools/notify-send.c?id=0.7.5#n231 |
28 |
which all seems fine. |
29 |
|
30 |
We need to look further at what the |
31 |
'notify_notification_set_timeout' implementation does at |
32 |
https://git.gnome.org/browse/libnotify/tree/libnotify/notification.c?id=0.7.5#n637 |
33 |
which sets notification->priv->timeout which is then used in |
34 |
notify_notification_show in a dbus call at |
35 |
https://git.gnome.org/browse/libnotify/tree/libnotify/notification.c?id=0.7.5#n596 |
36 |
and the relevant '_notify_notification_get_timeout' below it |
37 |
seems fine too, which is used once in |
38 |
https://git.gnome.org/browse/libnotify/tree/libnotify/notify.c?id=0.7.5#n176 |
39 |
but due to the lack of small functions and/or documentation it is |
40 |
unclear what it is trying to do here. But since this last bit is |
41 |
the uninit code I'm in doubt if that's where the fault would lie. |
42 |
|
43 |
Before digging in that code I'd rather suggest we look at what the |
44 |
notification daemon does with the notification it receives through |
45 |
dbus and what it does with the received timeout parameter. |
46 |
|
47 |
=== Receiving the dbus notification (is NOT OK, unused!) === |
48 |
|
49 |
The expiration time variable is again made in |
50 |
https://git.gnome.org/browse/notification-daemon/tree/src/daemon.c?id=0.7.6#n183 |
51 |
where it is received in |
52 |
https://git.gnome.org/browse/notification-daemon/tree/src/daemon.c?id=0.7.6#n192 |
53 |
and then the notification is updated in |
54 |
https://git.gnome.org/browse/notification-daemon/tree/src/daemon.c?id=0.7.6#n218 |
55 |
by calling |
56 |
https://git.gnome.org/browse/notification-daemon/tree/src/nd-notification.c?id=0.7.6#n153 |
57 |
|
58 |
Now, as you read through the function; or rather, grep for the |
59 |
timeout variable you'll see that it is not set in the function; |
60 |
a possible fix might be to put notification->timeout = timeout; |
61 |
somewhere in the function. Though, when doing so; I'm in doubt if |
62 |
it is used at all. So, when we grep the log we get |
63 |
|
64 |
https://git.gnome.org/browse/notification-daemon/log/src?qt=grep&q=timeout |
65 |
|
66 |
where we can see they are using some kind of NotifyTimeout class to |
67 |
accomplish timeouts. It might be that the timeout parameter needs |
68 |
to passed into some class; but for these details, some reading up |
69 |
on the documentation of those classes as well as the implementation |
70 |
of this design needs to be done to understand what is going on or |
71 |
what is supposed to be going on. |
72 |
|
73 |
Take home lesson: "How did this get released with an unused parameter?" |
74 |
|
75 |
-- |
76 |
With kind regards, |
77 |
|
78 |
Tom Wijsman (TomWij) |
79 |
Gentoo Developer |
80 |
|
81 |
E-mail address : TomWij@g.o |
82 |
GPG Public Key : 6D34E57D |
83 |
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D |