diff options
author | ashish <ashish@FreeBSD.org> | 2010-07-13 19:25:35 +0800 |
---|---|---|
committer | ashish <ashish@FreeBSD.org> | 2010-07-13 19:25:35 +0800 |
commit | fa894084cad7d5b5914a5109936730711e2a39f6 (patch) | |
tree | c7fd84b7743dc10d8f23db3c4add50ed38cf373c /irc | |
parent | 9f35b3fce1dff8cddfd5dcb3acd0ca024420c12c (diff) | |
download | freebsd-ports-gnome-fa894084cad7d5b5914a5109936730711e2a39f6.tar.gz freebsd-ports-gnome-fa894084cad7d5b5914a5109936730711e2a39f6.tar.zst freebsd-ports-gnome-fa894084cad7d5b5914a5109936730711e2a39f6.zip |
- Fix a bug with twitter protocol backend.
Approved by: pgj (mentor)
Diffstat (limited to 'irc')
-rw-r--r-- | irc/bitlbee-otr/Makefile | 1 | ||||
-rw-r--r-- | irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c | 56 |
2 files changed, 57 insertions, 0 deletions
diff --git a/irc/bitlbee-otr/Makefile b/irc/bitlbee-otr/Makefile index 1c6aa117292c..c532232a85e8 100644 --- a/irc/bitlbee-otr/Makefile +++ b/irc/bitlbee-otr/Makefile @@ -7,6 +7,7 @@ PORTNAME= bitlbee-otr PORTVERSION= 1.2.8 +PORTREVISION= 1 CATEGORIES= irc MASTER_SITES= http://fbsd.zlonet.ru/distfiles/ \ http://wahjava.users.sourceforge.net/ diff --git a/irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c b/irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c new file mode 100644 index 000000000000..214c25addf70 --- /dev/null +++ b/irc/bitlbee-otr/files/patch-protocols_twitter_twitter__lib.c @@ -0,0 +1,56 @@ + +$FreeBSD$ + +--- protocols/twitter/twitter_lib.c.orig ++++ protocols/twitter/twitter_lib.c +@@ -77,7 +77,8 @@ + static void txs_free(struct twitter_xml_status *txs) + { + g_free(txs->text); +- txu_free(txs->user); ++ if(txs->user) ++ txu_free(txs->user); + g_free(txs); + } + +@@ -472,19 +473,22 @@ + for ( l = list; l ; l = g_slist_next(l) ) + { + status = l->data; +- twitter_add_buddy(ic, status->user->screen_name, status->user->name); +- +- strip_html(status->text); ++ if(status->user) ++ { ++ twitter_add_buddy(ic, status->user->screen_name, status->user->name); + +- // Say it! +- if (g_strcasecmp(td->user, status->user->screen_name) == 0) +- imcb_chat_log (gc, "Your Tweet: %s", status->text); +- else +- imcb_chat_msg (gc, status->user->screen_name, status->text, 0, status->created_at ); ++ strip_html(status->text); + +- // Update the home_timeline_id to hold the highest id, so that by the next request +- // we won't pick up the updates allready in the list. +- td->home_timeline_id = td->home_timeline_id < status->id ? status->id : td->home_timeline_id; ++ // Say it! ++ if (g_strcasecmp(td->user, status->user->screen_name) == 0) ++ imcb_chat_log (gc, "Your Tweet: %s", status->text); ++ else ++ imcb_chat_msg (gc, status->user->screen_name, status->text, 0, status->created_at ); ++ ++ // Update the home_timeline_id to hold the highest id, so that by the next request ++ // we won't pick up the updates allready in the list. ++ td->home_timeline_id = td->home_timeline_id < status->id ? status->id : td->home_timeline_id; ++ } + } + } + +@@ -735,4 +739,4 @@ + args[0] = "screen_name"; + args[1] = who; + twitter_http(ic, create ? TWITTER_FRIENDSHIPS_CREATE_URL : TWITTER_FRIENDSHIPS_DESTROY_URL, twitter_http_post, ic, 1, args, 2); +-} +\ No newline at end of file ++} |