aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber')
-rw-r--r--protocols/jabber/conference.c4
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/jabber/jabber.h2
-rw-r--r--protocols/jabber/presence.c10
4 files changed, 10 insertions, 8 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index 79fdd053..480006bd 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -25,7 +25,7 @@
static xt_status jabber_chat_join_failed( struct im_connection *ic, struct xt_node *node, struct xt_node *orig );
-struct groupchat *jabber_chat_join( struct im_connection *ic, char *room, char *nick, char *password )
+struct groupchat *jabber_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password )
{
struct jabber_chat *jc;
struct xt_node *node;
@@ -35,9 +35,9 @@ struct groupchat *jabber_chat_join( struct im_connection *ic, char *room, char *
roomjid = g_strdup_printf( "%s/%s", room, nick );
node = xt_new_node( "x", NULL, NULL );
xt_add_attr( node, "xmlns", XMLNS_MUC );
- node = jabber_make_packet( "presence", NULL, roomjid, node );
if( password )
xt_add_child( node, xt_new_node( "password", password, NULL ) );
+ node = jabber_make_packet( "presence", NULL, roomjid, node );
jabber_cache_add( ic, node, jabber_chat_join_failed );
if( !jabber_write_packet( ic, node ) )
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 518c9506..6f7e1c05 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -424,7 +424,7 @@ static void jabber_remove_buddy( struct im_connection *ic, char *who, char *grou
presence_send_request( ic, who, "unsubscribe" );
}
-static struct groupchat *jabber_chat_join_( struct im_connection *ic, char *room, char *nick, char *password )
+static struct groupchat *jabber_chat_join_( struct im_connection *ic, const char *room, const char *nick, const char *password )
{
if( strchr( room, '@' ) == NULL )
imcb_error( ic, "Invalid room name: %s", room );
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index 904bf0c4..ee453144 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -239,7 +239,7 @@ xt_status sasl_pkt_result( struct xt_node *node, gpointer data );
gboolean sasl_supported( struct im_connection *ic );
/* conference.c */
-struct groupchat *jabber_chat_join( struct im_connection *ic, char *room, char *nick, char *password );
+struct groupchat *jabber_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password );
struct groupchat *jabber_chat_by_jid( struct im_connection *ic, const char *name );
void jabber_chat_free( struct groupchat *c );
int jabber_chat_msg( struct groupchat *ic, char *message, int flags );
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c
index 6fc360b7..939bc888 100644
--- a/protocols/jabber/presence.c
+++ b/protocols/jabber/presence.c
@@ -48,8 +48,9 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
{
if( !( bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT | GET_BUDDY_CREAT ) ) )
{
- if( set_getbool( &ic->irc->set, "debug" ) )
- imcb_log( ic, "Warning: Could not handle presence information from JID: %s", from );
+ /*
+ imcb_log( ic, "Warning: Could not handle presence information from JID: %s", from );
+ */
return XT_HANDLED;
}
@@ -105,8 +106,9 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
{
if( ( bud = jabber_buddy_by_jid( ic, from, 0 ) ) == NULL )
{
- if( set_getbool( &ic->irc->set, "debug" ) )
- imcb_log( ic, "Warning: Received presence information from unknown JID: %s", from );
+ /*
+ imcb_log( ic, "Warning: Received presence information from unknown JID: %s", from );
+ */
return XT_HANDLED;
}