#47 Notifications stoped appearing.

open
nobody
None
5
2009-06-14
2009-06-14
Joe
No

I am running Twitux .69 on Ubuntu 9.4 installed though Synaptic. A few days ago I noticed that I did not get the pop-up of notifications of a new tweet. I have "Display notification when message received" checked. I can still get tweets by clicking on the icon and reading them in the window that pop-up but my favorite part, the notifications, are not working anymore. I am not aware of what could be causing this problem I installed libnotify-bin but twitux's notifications still worked after that for several days. I have tried reinstalling Twitux and the problem still persists.

Discussion

  • Nobody/Anonymous

    I also started having this problem around the same time. I am running Debian unstable.

     
  • Nobody/Anonymous

    I read about this (http://www.networkworld.com/columnists/2009/061209-backspin.html) happening to twitter applications about the same time but I doubt that is the case. I looked at my apt-get history and there wasn't really anything that poped out at me that updated that would affect it either.

     
  • Nobody/Anonymous

    http://www.networkworld.com/columnists/2009/061209-backspin.html is exactly the reason for the error. Due to the integer overflow twitux 0.69 fails to recognize new messages and therefore no notifications are generated. The bug is located in the file twitux-parser.c. Here is a patch of what I changed to make it work:

    32d31
    < #include <stdlib.h>
    69c68
    < static long long last_id = 0;
    ---
    > static gint last_id = 0;
    199c198
    < long long lastTweet = 0;
    ---
    > gint lastTweet = 0;
    236c235
    < long long sid;
    ---
    > gint sid;
    241c240
    < sid = atoll (status->id);
    ---
    > sid = atoi (status->id);

     
  • Mehmet Nur Olcay

    same problem here, anyone else used that patch ? I couldn't not apply it.. It would be good if some could attach it to patches or here

     
  • Marco Villegas

    Marco Villegas - 2009-11-16

    I had to review this instead of obtaining to the same conclusion :-(.

    Well, so here is a patch(can not see how attach a file here) as same as in one of the previous comments, but using guint instead of long long and with lines synced to HEAD.

    From 4bf2a628ec6d3cc674a444a4a08f0e94bd324307 Mon Sep 17 00:00:00 2001
    From: Marco Antonio Villegas Vega <marvil07@gmail.com>
    Date: Mon, 16 Nov 2009 00:23:24 -0500
    Subject: [PATCH] let notify work again: status id now need to be guint

    sid need to be guint to convert status->id correctly to a number
    ---
    src/twitux-parser.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/src/twitux-parser.c b/src/twitux-parser.c
    index b8371c9..cc6df90 100644
    --- a/src/twitux-parser.c
    +++ b/src/twitux-parser.c
    @@ -65,7 +65,7 @@ static gchar *parser_convert_time (const char *datetime);
    static gboolean display_notification (gpointer tweet);

    /* id of the newest tweet showed */
    -static gint last_id = 0;
    +static gulong last_id = 0;

    static xmlDoc*
    parser_twitux_parse (const char *data,
    @@ -195,7 +195,7 @@ twitux_parser_timeline (const gchar *data,

    /* Count new tweets */
    gboolean show_notification = (last_id > 0);
    - gint lastTweet = 0;
    + gulong lastTweet = 0;
    /*
    * On multiple tweet updates we only want to
    * play the sound notification once.
    @@ -232,12 +232,12 @@ twitux_parser_timeline (const gchar *data,
    g_str_equal (cur_node->name, "direct_message")) {
    gchar *tweet;
    gchar *datetime;
    - gint sid;
    + gulong sid;

    /* Parse node */
    status = parser_twitux_node_status (cur_node->children);

    - sid = atoi (status->id);
    + sid = atoll (status->id);

    /* the first tweet parsed is the 'newest' */
    if (lastTweet == 0){
    --
    1.6.5

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks