aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/jabber')
-rw-r--r--protocols/jabber/Makefile2
-rw-r--r--protocols/jabber/iq.c38
-rw-r--r--protocols/jabber/jabber.c4
-rw-r--r--protocols/jabber/jabber.h2
4 files changed, 27 insertions, 19 deletions
diff --git a/protocols/jabber/Makefile b/protocols/jabber/Makefile
index 891df5eb..78a02696 100644
--- a/protocols/jabber/Makefile
+++ b/protocols/jabber/Makefile
@@ -9,7 +9,7 @@
-include ../../Makefile.settings
# [SH] Program variables
-objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o sasl.o si.o s5bytestream.o
+objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o s5bytestream.o sasl.o si.o
CFLAGS += -Wall
LFLAGS += -r
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c
index f17a7bb5..e0658a9e 100644
--- a/protocols/jabber/iq.c
+++ b/protocols/jabber/iq.c
@@ -98,9 +98,9 @@ xt_status jabber_pkt_iq( struct xt_node *node, gpointer data )
XMLNS_CHATSTATES,
XMLNS_MUC,
XMLNS_PING,
- XMLNS_SI,
- XMLNS_BYTESTREAMS,
- XMLNS_FILETRANSFER,
+ XMLNS_SI,
+ XMLNS_BYTESTREAMS,
+ XMLNS_FILETRANSFER,
NULL };
const char **f;
@@ -126,16 +126,18 @@ xt_status jabber_pkt_iq( struct xt_node *node, gpointer data )
}
else if( strcmp( type, "set" ) == 0 )
{
- if( ( c = xt_find_node( node->children, "si" ) ) &&
- ( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_SI ) == 0 ) )
+ if( ( c = xt_find_node( node->children, "si" ) ) &&
+ ( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_SI ) == 0 ) )
{
return jabber_si_handle_request( ic, node, c );
- } else if( !( c = xt_find_node( node->children, "query" ) ) ||
- !( s = xt_find_attr( c, "xmlns" ) ) )
+ }
+ else if( !( c = xt_find_node( node->children, "query" ) ) ||
+ !( s = xt_find_attr( c, "xmlns" ) ) )
{
imcb_log( ic, "Warning: Received incomplete IQ-%s packet", type );
return XT_HANDLED;
- } else if( strcmp( s, XMLNS_ROSTER ) == 0 )
+ }
+ else if( strcmp( s, XMLNS_ROSTER ) == 0 )
{
/* This is a roster push. XMPP servers send this when someone
was added to (or removed from) the buddy list. AFAIK they're
@@ -159,11 +161,13 @@ xt_status jabber_pkt_iq( struct xt_node *node, gpointer data )
reply = jabber_make_error_packet( node, "not-allowed", "cancel", NULL );
pack = 0;
}
- } else if( strcmp( s, XMLNS_BYTESTREAMS ) == 0 )
+ }
+ else if( strcmp( s, XMLNS_BYTESTREAMS ) == 0 )
{
- /* Bytestream Request (stage 2 of file transfer) */
+ /* Bytestream Request (stage 2 of file transfer) */
return jabber_bs_recv_request( ic, node, c );
- } else
+ }
+ else
{
xt_free_node( reply );
reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel", NULL );
@@ -654,9 +658,10 @@ xt_status jabber_iq_parse_features( struct im_connection *ic, struct xt_node *no
}
c = c->children;
- while( ( c = xt_find_node( c, "feature" ) ) ) {
+ while( ( c = xt_find_node( c, "feature" ) ) )
+ {
feature = xt_find_attr( c, "var" );
- bud->features = g_slist_append(bud->features, g_strdup(feature) );
+ bud->features = g_slist_append( bud->features, g_strdup( feature ) );
c = c->next;
}
@@ -718,7 +723,8 @@ xt_status jabber_iq_parse_server_features( struct im_connection *ic, struct xt_n
c = c->next;
}
- } else if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_DISCO_INFO ) == 0 )
+ }
+ else if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_DISCO_INFO ) == 0 )
{
char *category, *type;
@@ -736,7 +742,8 @@ xt_status jabber_iq_parse_server_features( struct im_connection *ic, struct xt_n
c = c->next;
}
- } else if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_BYTESTREAMS ) == 0 )
+ }
+ else if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_BYTESTREAMS ) == 0 )
{
char *host, *jid;
int port;
@@ -760,5 +767,6 @@ xt_status jabber_iq_parse_server_features( struct im_connection *ic, struct xt_n
if( jd->have_streamhosts == 0 )
jd->have_streamhosts++;
+
return XT_HANDLED;
}
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 15341c9b..02461101 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -62,6 +62,8 @@ static void jabber_init( account_t *acc )
s->flags |= ACC_SET_OFFLINE_ONLY;
s = set_add( &acc->set, "priority", "0", set_eval_priority, acc );
+
+ s = set_add( &acc->set, "proxy", "<local>;<auto>", NULL, acc );
s = set_add( &acc->set, "resource", "BitlBee", NULL, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;
@@ -79,8 +81,6 @@ static void jabber_init( account_t *acc )
s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;
-
- s = set_add( &acc->set, "proxy", "<local>;<auto>", NULL, acc );
}
static void jabber_generate_id_hash( struct jabber_data *jd );
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index 9f101f83..898c4978 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -59,7 +59,7 @@ typedef enum
have a real JID. */
} jabber_buddy_flags_t;
-/* Stores a streamhost's(a.k.a. proxy) data */
+/* Stores a streamhost's (a.k.a. proxy) data */
typedef struct
{
char *jid;