diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/jabber/jabber.c | 2 | ||||
| -rw-r--r-- | protocols/oscar/oscar.c | 1 | ||||
| -rw-r--r-- | protocols/oscar/rxqueue.c | 9 | ||||
| -rw-r--r-- | protocols/yahoo/yahoo.c | 17 | 
4 files changed, 20 insertions, 9 deletions
| diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index d4b5bde5..ba652b8a 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -412,7 +412,7 @@ static void gjab_recv(gjconn gjc)  		XML_Parse(gjc->parser, buf, len, 0);  		if (jd->die)  			signoff(GJ_GC(gjc)); -	} else if (len < 0 || errno != EAGAIN) { +	} else if (len == 0 || (len < 0 && (!sockerr_again() || gjc->ssl))) {  		STATE_EVT(JCONN_STATE_OFF)  	}  } diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index b4bfb220..4e552bce 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -607,6 +607,7 @@ static void damn_you(gpointer data, gint source, GaimInputCondition c)  		g_free(pos);  		return;  	} +	/* [WvG] Wheeeee! Who needs error checking anyway? ;-) */  	read(pos->fd, m, 16);  	m[16] = '\0';  	gaim_input_remove(pos->inpa); diff --git a/protocols/oscar/rxqueue.c b/protocols/oscar/rxqueue.c index d8adaa73..6e8dd29c 100644 --- a/protocols/oscar/rxqueue.c +++ b/protocols/oscar/rxqueue.c @@ -352,8 +352,15 @@ int aim_get_command(aim_session_t *sess, aim_conn_t *conn)  	if (conn->fd == -1)  		return -1; /* its a aim_conn_close()'d connection */ -	if (conn->fd < 3)  /* can happen when people abuse the interface */ +	/* KIDS, THIS IS WHAT HAPPENS IF YOU USE CODE WRITTEN FOR GUIS IN A DAEMON! +	    +	   And wouldn't it make sense to return something that prevents this function +	   from being called again IMMEDIATELY (and making the program suck up all +	   CPU time)?... +	    +	if (conn->fd < 3)  		return 0; +	*/  	if (conn->status & AIM_CONN_STATUS_INPROGRESS)  		return aim_conn_completeconnect(sess, conn); diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 832d1ab4..4f257d99 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -188,18 +188,18 @@ static int byahoo_send_typing( struct gaim_connection *gc, char *who, int typing  static void byahoo_set_away( struct gaim_connection *gc, char *state, char *msg )  {  	struct byahoo_data *yd = (struct byahoo_data *) gc->proto_data; - +	  	gc->away = NULL; - -	if (msg) +	 +	if( msg )  	{  		yd->current_status = YAHOO_STATUS_CUSTOM;  		gc->away = "";  	} -	else if (state) +	if( state )  	{  		gc->away = ""; -		if( g_strcasecmp(state, "Available" ) == 0 ) +		if( g_strcasecmp( state, "Available" ) == 0 )  		{  			yd->current_status = YAHOO_STATUS_AVAILABLE;  			gc->away = NULL; @@ -234,12 +234,15 @@ static void byahoo_set_away( struct gaim_connection *gc, char *state, char *msg  			gc->away = NULL;  		}  	} -	else if ( gc->is_idle ) +	else if( gc->is_idle )  		yd->current_status = YAHOO_STATUS_IDLE;  	else  		yd->current_status = YAHOO_STATUS_AVAILABLE; -	yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL ); +	if( yd->current_status == YAHOO_STATUS_INVISIBLE ) +		yahoo_set_away( yd->y2_id, yd->current_status, NULL, gc->away != NULL ); +	else +		yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL );  }  static GList *byahoo_away_states( struct gaim_connection *gc ) | 
