From 764b163d6bc0587498c14de8023d70aea076e646 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 12 Oct 2007 14:18:16 +0200 Subject: Fix another warning. --- protocols/nogaim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index d90870ad..d0395fa9 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -35,7 +35,7 @@ #include "nogaim.h" #include -static int remove_chat_buddy_silent( struct groupchat *b, char *handle ); +static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ); GSList *connections; @@ -555,7 +555,7 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, /* Remove him/her from the conversations to prevent PART messages after he/she QUIT already */ for( c = ic->conversations; c; c = c->next ) - remove_chat_buddy_silent( c, (char*) handle ); + remove_chat_buddy_silent( c, handle ); } if( flags & OPT_AWAY ) @@ -820,7 +820,7 @@ void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason ) irc_part( b->ic->irc, u, b->channel ); } -static int remove_chat_buddy_silent( struct groupchat *b, char *handle ) +static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ) { GList *i; -- cgit v1.2.3 From be68d99a58721768033c83d2f0a8f26e1af9bd73 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 10 Nov 2007 09:25:50 +0000 Subject: Handing of multipart messages in OSCAR (usually from mobiles), this fixes bug #88, at last. --- protocols/oscar/oscar.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 426dd4a2..2b8b4853 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -1065,8 +1065,17 @@ static int incomingim_chan1(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_ } else { g_snprintf(tmp, BUF_LONG, "%s", args->msg); } - } else + } else if (args->mpmsg.numparts == 0) { g_snprintf(tmp, BUF_LONG, "%s", args->msg); + } else { + int i; + + *tmp = 0; + for (i = 0; i < args->mpmsg.numparts; i ++) { + g_strlcat(tmp, (char*) args->mpmsg.parts[i].data, BUF_LONG); + g_strlcat(tmp, "\n", BUF_LONG); + } + } strip_linefeed(tmp); imcb_buddy_msg(ic, userinfo->sn, tmp, flags, 0); -- cgit v1.2.3 From 1bf1ae6f25ff56894d67999791802aa864eaa02b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 14 Nov 2007 23:09:22 +0000 Subject: Removed some debugging stuff that shouldn't have been here for a long time already. --- protocols/jabber/io.c | 9 --------- protocols/jabber/presence.c | 5 ----- protocols/jabber/xmltree.c | 2 ++ 3 files changed, 2 insertions(+), 14 deletions(-) (limited to 'protocols') diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 67deb3a6..925463a4 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -475,14 +475,6 @@ static xt_status jabber_pkt_stream_error( struct xt_node *node, gpointer data ) return XT_ABORT; } -static xt_status jabber_pkt_misc( struct xt_node *node, gpointer data ) -{ - printf( "Received unknown packet:\n" ); - xt_print( node ); - - return XT_HANDLED; -} - static const struct xt_handler_entry jabber_handlers[] = { { "stream:stream", "", jabber_end_of_stream }, { "message", "stream:stream", jabber_pkt_message }, @@ -494,7 +486,6 @@ static const struct xt_handler_entry jabber_handlers[] = { { "challenge", "stream:stream", sasl_pkt_challenge }, { "success", "stream:stream", sasl_pkt_result }, { "failure", "stream:stream", sasl_pkt_result }, - { NULL, "stream:stream", jabber_pkt_misc }, { NULL, NULL, NULL } }; diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index ef92740a..49c66a3d 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -127,11 +127,6 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ) { /* What to do with it? */ } - else - { - printf( "Received PRES from %s:\n", from ); - xt_print( node ); - } return XT_HANDLED; } diff --git a/protocols/jabber/xmltree.c b/protocols/jabber/xmltree.c index 7a165a1e..7e74cccb 100644 --- a/protocols/jabber/xmltree.c +++ b/protocols/jabber/xmltree.c @@ -304,6 +304,7 @@ char *xt_to_string( struct xt_node *node ) return real; } +#ifdef DEBUG void xt_print( struct xt_node *node ) { int i; @@ -354,6 +355,7 @@ void xt_print( struct xt_node *node ) /* Non-empty tag is now finished. */ printf( "\n", node->name ); } +#endif struct xt_node *xt_dup( struct xt_node *node ) { -- cgit v1.2.3