aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-12-13 14:48:56 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2009-12-13 14:48:56 +0000
commit1c3008ac0b2b29f7e14ec9b874af3277c511c7a4 (patch)
tree06bbcb3f3dfc999ff44ee4c41b86f590fc1f6aef /protocols
parent2288705af462b4aca2d56f228bff269eab8d8b5f (diff)
No functional changes, just some style "fixes". Although I admit I'm
somewhat growing out of my own coding style, I do try to keep things consistent at least within files. Comments are now in reviewboard: http://code.bitlbee.org/rb/r/13/
Diffstat (limited to 'protocols')
-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
-rw-r--r--protocols/msn/Makefile2
-rw-r--r--protocols/msn/msn.c2
-rw-r--r--protocols/msn/sb.c6
7 files changed, 33 insertions, 23 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;
diff --git a/protocols/msn/Makefile b/protocols/msn/Makefile
index dd5d46e2..5d199b9e 100644
--- a/protocols/msn/Makefile
+++ b/protocols/msn/Makefile
@@ -9,7 +9,7 @@
-include ../../Makefile.settings
# [SH] Program variables
-objects = msn.o msn_util.o ns.o passport.o sb.o tables.o invitation.o
+objects = invitation.o msn.o msn_util.o ns.o passport.o sb.o tables.o
CFLAGS += -Wall
LFLAGS += -r
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c
index 590a1382..b17a0bfa 100644
--- a/protocols/msn/msn.c
+++ b/protocols/msn/msn.c
@@ -77,7 +77,7 @@ static void msn_logout( struct im_connection *ic )
if( md )
{
while( md->filetransfers ) {
- imcb_file_canceled( md->filetransfers->data, "Closing msn connection" );
+ imcb_file_canceled( md->filetransfers->data, "Closing connection" );
}
if( md->fd >= 0 )
diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c
index b60a9a8b..c3302e57 100644
--- a/protocols/msn/sb.c
+++ b/protocols/msn/sb.c
@@ -173,11 +173,13 @@ int msn_sb_sendmessage( struct msn_switchboard *sb, char *text )
i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic->acc->user );
buf = g_new0( char, i );
i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic->acc->user );
- } else if( strncmp( text, MSN_INVITE_HEADERS, sizeof( MSN_INVITE_HEADERS ) - 1 ) == 0 )
+ }
+ else if( strncmp( text, MSN_INVITE_HEADERS, sizeof( MSN_INVITE_HEADERS ) - 1 ) == 0 )
{
buf = g_strdup( text );
i = strlen( buf );
- } else
+ }
+ else
{
buf = g_new0( char, sizeof( MSN_MESSAGE_HEADERS ) + strlen( text ) * 2 + 1 );
i = strlen( MSN_MESSAGE_HEADERS );