diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-17 00:31:55 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-17 00:31:55 +0100 | 
| commit | 4346c3f4343d0cf67a7eefc381c5b10e15011ce8 (patch) | |
| tree | c8777657d9beb067fa5e92f2df7b193fa0ae60a1 /protocols | |
| parent | 3709301b1559aabb3292e8c15bac14a85d8fc31e (diff) | |
| parent | ef14a83adbb9036c0006ad460c5e11882a3d7e13 (diff) | |
Merging mainline.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/oscar/oscar.c | 2 | ||||
| -rw-r--r-- | protocols/twitter/twitter_lib.c | 17 | 
2 files changed, 17 insertions, 2 deletions
| diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index acae6433..9a9f2999 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -2530,7 +2530,7 @@ struct groupchat *oscar_chat_with(struct im_connection * ic, char *who)  	char * chatname;  	struct groupchat *c; -	chatname = g_strdup_printf("%s%s_%d", isdigit(*ic->acc->user) ? "icq_" : "", +	chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",  	                           ic->acc->user, chat_id++);  	c = imcb_chat_new(ic, chatname); diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 92c6415f..b4b460d3 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -35,6 +35,14 @@  #include <ctype.h>  #include <errno.h> +/* GLib < 2.12.0 doesn't have g_ascii_strtoll(), work around using system strtoll(). */ +/* GLib < 2.12.4 can be buggy: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488013 */ +#if !GLIB_CHECK_VERSION(2,12,5) +#include <stdlib.h> +#include <limits.h> +#define g_ascii_strtoll strtoll +#endif +  #define TXL_STATUS 1  #define TXL_USER 2  #define TXL_ID 3 @@ -65,6 +73,8 @@ static void twitter_groupchat_init(struct im_connection *ic);   */  static void txu_free(struct twitter_xml_user *txu)  { +	if (txu == NULL) +		return;  	g_free(txu->name);  	g_free(txu->screen_name);  	g_free(txu); @@ -88,6 +98,8 @@ static void txs_free(struct twitter_xml_status *txs)  static void txl_free(struct twitter_xml_list *txl)  {  	GSList *l; +	if (txl == NULL) +		return;  	for ( l = txl->list; l ; l = g_slist_next(l) )  		if (txl->type == TXL_STATUS)  			txs_free((struct twitter_xml_status *)l->data); @@ -472,6 +484,9 @@ static void twitter_groupchat(struct im_connection *ic, GSList *list)  	for ( l = list; l ; l = g_slist_next(l) )  	{  		status = l->data; +		if (status->user == NULL || status->text == NULL) +			continue; +  		twitter_add_buddy(ic, status->user->screen_name, status->user->name);  		strip_html(status->text); @@ -735,4 +750,4 @@ void twitter_friendships_create_destroy(struct im_connection *ic, char *who, int  	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 +} | 
