aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-11-14 23:42:07 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2007-11-14 23:42:07 +0000
commitebb95b68792dde490a1ea1042209525f176af58d (patch)
tree2a980be2b7bea3db77dec209e6ca5f591165885b /protocols
parenta6df0b5d21370549328c7929a008abb68f2ed4db (diff)
parent1bf1ae6f25ff56894d67999791802aa864eaa02b (diff)
Merging from devel/Jelmer.
Diffstat (limited to 'protocols')
-rw-r--r--protocols/jabber/io.c9
-rw-r--r--protocols/jabber/presence.c5
-rw-r--r--protocols/jabber/xmltree.c2
-rw-r--r--protocols/nogaim.c6
-rw-r--r--protocols/oscar/oscar.c11
5 files changed, 15 insertions, 18 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c
index cf71ff87..61cd142e 100644
--- a/protocols/jabber/io.c
+++ b/protocols/jabber/io.c
@@ -469,14 +469,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 xt_status jabber_xmlconsole( struct xt_node *node, gpointer data )
{
struct im_connection *ic = data;
@@ -508,7 +500,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 cbfcedae..71a044b5 100644
--- a/protocols/jabber/presence.c
+++ b/protocols/jabber/presence.c
@@ -169,11 +169,6 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
}
/* What else 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 b1edd55d..62549eb5 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( "</%s>\n", node->name );
}
+#endif
struct xt_node *xt_dup( struct xt_node *node )
{
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 3307b0f5..d1aceb1a 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -35,7 +35,7 @@
#include "nogaim.h"
#include <ctype.h>
-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;
@@ -577,7 +577,7 @@ void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags,
/* Remove him/her from the groupchats to prevent PART messages after he/she QUIT already */
for( c = ic->groupchats; c; c = c->next )
- remove_chat_buddy_silent( c, (char*) handle );
+ remove_chat_buddy_silent( c, handle );
}
if( flags & OPT_AWAY )
@@ -848,7 +848,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;
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index 4d18e832..96983738 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);