diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/Makefile | 1 | ||||
| -rw-r--r-- | protocols/jabber/Makefile | 1 | ||||
| -rw-r--r-- | protocols/jabber/jabber.c | 8 | ||||
| -rw-r--r-- | protocols/jabber/message.c | 5 | ||||
| -rw-r--r-- | protocols/msn/Makefile | 1 | ||||
| -rw-r--r-- | protocols/msn/msn.c | 7 | ||||
| -rw-r--r-- | protocols/nogaim.c | 4 | ||||
| -rw-r--r-- | protocols/nogaim.h | 6 | ||||
| -rw-r--r-- | protocols/oscar/Makefile | 1 | ||||
| -rw-r--r-- | protocols/twitter/Makefile | 1 | ||||
| -rw-r--r-- | protocols/twitter/twitter_lib.c | 3 | ||||
| -rw-r--r-- | protocols/yahoo/Makefile | 2 | ||||
| -rw-r--r-- | protocols/yahoo/libyahoo2.c | 3 | 
13 files changed, 25 insertions, 18 deletions
| diff --git a/protocols/Makefile b/protocols/Makefile index d4aa6e14..1c7816bc 100644 --- a/protocols/Makefile +++ b/protocols/Makefile @@ -24,7 +24,6 @@ subdirobjs = $(PROTOOBJS)  # Expansion of variables  subdirobjs := $(join $(subdirs),$(addprefix /,$(subdirobjs))) -CFLAGS += -Wall  LFLAGS += -r  # [SH] Phony targets diff --git a/protocols/jabber/Makefile b/protocols/jabber/Makefile index 912ea702..efbd81fb 100644 --- a/protocols/jabber/Makefile +++ b/protocols/jabber/Makefile @@ -14,7 +14,6 @@ endif  # [SH] Program variables  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  # [SH] Phony targets diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 01353f8e..229e35bf 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -380,7 +380,7 @@ static void jabber_get_info( struct im_connection *ic, char *who )  		imcb_log( ic, "Buddy %s (%d) information:", bud->full_jid, bud->priority );  		if( bud->away_state )  			imcb_log( ic, "Away state: %s", bud->away_state->full_name ); -		imcb_log( ic, "Status message: %s", bud->away_message ? : "(none)" ); +		imcb_log( ic, "Status message: %s", bud->away_message ? bud->away_message : "(none)" );  		bud = bud->next;  	} @@ -394,8 +394,10 @@ static void jabber_set_away( struct im_connection *ic, char *state_txt, char *me  	/* state_txt == NULL -> Not away.  	   Unknown state -> fall back to the first defined away state. */ -	jd->away_state = state_txt ? jabber_away_state_by_name( state_txt ) -	                 ? : jabber_away_state_list : NULL; +	if( state_txt == NULL ) +		jd->away_state = NULL; +	else if( ( jd->away_state = jabber_away_state_by_name( state_txt ) ) == NULL ) +		jd->away_state = jabber_away_state_list;  	g_free( jd->away_message );  	jd->away_message = ( message && *message ) ? g_strdup( message ) : NULL; diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c index fa915bd8..ce5017fb 100644 --- a/protocols/jabber/message.c +++ b/protocols/jabber/message.c @@ -58,7 +58,8 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data )  			    ( inv = xt_find_node( c->children, "invite" ) ) )  			{  				room = from; -				from = xt_find_attr( inv, "from" ) ? : from; +				if( ( from = xt_find_attr( inv, "from" ) ) == NULL ) +					from = room;  				g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room );  				if( ( reason = xt_find_node( inv->children, "reason" ) ) && reason->text_len > 0 ) @@ -71,7 +72,7 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data )  			if( bud )  			{  				bud->last_msg = time( NULL ); -				from = bud->ext_jid ? : bud->bare_jid; +				from = bud->ext_jid ? bud->ext_jid : bud->bare_jid;  			}  			else  				*s = 0; /* We need to generate a bare JID now. */ diff --git a/protocols/msn/Makefile b/protocols/msn/Makefile index 6c59aedb..781482f5 100644 --- a/protocols/msn/Makefile +++ b/protocols/msn/Makefile @@ -14,7 +14,6 @@ endif  # [SH] Program variables  objects = msn.o msn_util.o ns.o passport.o sb.o tables.o -CFLAGS += -Wall  LFLAGS += -r  # [SH] Phony targets diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index de8271e8..60d58532 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -175,11 +175,10 @@ static void msn_set_away( struct im_connection *ic, char *state, char *message )  	char buf[1024];  	struct msn_data *md = ic->proto_data; -	if( state ) -		md->away_state = msn_away_state_by_name( state ) ? : -		                 msn_away_state_list + 1; -	else +	if( state == NULL )  		md->away_state = msn_away_state_list; +	else if( ( md->away_state = msn_away_state_by_name( state ) ) == NULL ) +		md->away_state = msn_away_state_list + 1;  	g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code );  	msn_write( ic, buf, strlen( buf ) ); diff --git a/protocols/nogaim.c b/protocols/nogaim.c index c14b222d..7943e026 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -467,7 +467,7 @@ void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *re  		realname_ = g_strdup_printf( " (%s)", realname );  	s = g_strdup_printf( "The user %s%s wants to add you to his/her buddy list.", -	                     handle, realname_ ?: "" ); +	                     handle, realname_ ? realname_ : "" );  	g_free( realname_ ); @@ -490,7 +490,7 @@ static void imcb_ask_add_cb_yes( void *data )  	cbd->ic->acc->prpl->add_buddy( cbd->ic, cbd->handle, NULL ); -	return imcb_ask_add_cb_no( data ); +	imcb_ask_add_cb_no( data );  }  void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname ) diff --git a/protocols/nogaim.h b/protocols/nogaim.h index a12ce89b..1665a730 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -38,7 +38,13 @@  #ifndef _NOGAIM_H  #define _NOGAIM_H +#if(__sun) +#include <inttypes.h> +#else  #include <stdint.h> +#endif + +#include "lib/events.h"  #include "bitlbee.h"  #include "account.h" diff --git a/protocols/oscar/Makefile b/protocols/oscar/Makefile index 0ec7436b..c1a966ad 100644 --- a/protocols/oscar/Makefile +++ b/protocols/oscar/Makefile @@ -15,7 +15,6 @@ endif  # [SH] Program variables  objects = admin.o auth.o bos.o buddylist.o chat.o chatnav.o conn.o icq.o im.o info.o misc.o msgcookie.o rxhandlers.o rxqueue.o search.o service.o snac.o ssi.o stats.o tlv.o txqueue.o oscar_util.o oscar.o -CFLAGS += -Wall  LFLAGS += -r  # [SH] Phony targets diff --git a/protocols/twitter/Makefile b/protocols/twitter/Makefile index 8a4b97f9..3fa9b61e 100644 --- a/protocols/twitter/Makefile +++ b/protocols/twitter/Makefile @@ -14,7 +14,6 @@ endif  # [SH] Program variables  objects = twitter.o twitter_http.o twitter_lib.o -CFLAGS += -Wall  LFLAGS += -r  # [SH] Phony targets diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index dfb5597f..5c89e4f6 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -22,7 +22,10 @@  ****************************************************************************/  /* For strptime(): */ +#if(__sun) +#else  #define _XOPEN_SOURCE +#endif  #include "twitter_http.h"  #include "twitter.h" diff --git a/protocols/yahoo/Makefile b/protocols/yahoo/Makefile index 20ecce71..a8021ffb 100644 --- a/protocols/yahoo/Makefile +++ b/protocols/yahoo/Makefile @@ -14,7 +14,7 @@ endif  # [SH] Program variables  objects = yahoo.o crypt.o libyahoo2.o yahoo_fn.o yahoo_httplib.o yahoo_util.o -CFLAGS += -Wall -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB +CFLAGS += -DSTDC_HEADERS -DHAVE_STRING_H -DHAVE_STRCHR -DHAVE_MEMCPY -DHAVE_GLIB  LFLAGS += -r  # [SH] Phony targets diff --git a/protocols/yahoo/libyahoo2.c b/protocols/yahoo/libyahoo2.c index 9e0d705b..b062e7f9 100644 --- a/protocols/yahoo/libyahoo2.c +++ b/protocols/yahoo/libyahoo2.c @@ -1858,7 +1858,8 @@ static void yahoo_https_auth_token_finish(struct http_request *req)  		goto fail;  	} -	return yahoo_https_auth_init(had); +	yahoo_https_auth_init(had); +	return;  fail:  	g_free(had->token); | 
