diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/http_client.c | 5 | ||||
| -rw-r--r-- | protocols/oscar/chat.c | 2 | ||||
| -rw-r--r-- | protocols/oscar/oscar.c | 8 | 
3 files changed, 11 insertions, 4 deletions
| diff --git a/protocols/http_client.c b/protocols/http_client.c index 5db31782..e181438c 100644 --- a/protocols/http_client.c +++ b/protocols/http_client.c @@ -239,6 +239,11 @@ static void http_incoming_data( gpointer data, int source, GaimInputCondition co  	return;  got_reply: +	/* Maybe if the webserver is overloaded, or when there's bad SSL +	   support... */ +	if( req->bytes_read == 0 ) +		goto cleanup; +	  	/* Zero termination is very convenient. */  	req->reply_headers[req->bytes_read] = 0; diff --git a/protocols/oscar/chat.c b/protocols/oscar/chat.c index 8843b499..df535c4f 100644 --- a/protocols/oscar/chat.c +++ b/protocols/oscar/chat.c @@ -162,6 +162,7 @@ int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const  	/* [WvG] This wasn't there originally, but we really should send  	         the right charset flags, as we also do with normal  	         messages. Hope this will work. :-) */ +	/*  	if (flags & AIM_CHATFLAGS_UNICODE)  		aimbs_put16(&fr->data, 0x0002);  	else if (flags & AIM_CHATFLAGS_ISO_8859_1) @@ -170,6 +171,7 @@ int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const  		aimbs_put16(&fr->data, 0x0000);  	aimbs_put16(&fr->data, 0x0000); +	*/  	/*  	 * SubTLV: Type 1: Message diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 5174f95c..c2716c6b 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -137,9 +137,9 @@ static char *extract_name(const char *name) {  	char *tmp;  	int i, j;  	char *x = strchr(name, '-'); -	if (!x) return NULL; +	if (!x) return g_strdup(name);  	x = strchr(++x, '-'); -	if (!x) return NULL; +	if (!x) return g_strdup(name);  	tmp = g_strdup(++x);  	for (i = 0, j = 0; x[i]; i++) { @@ -2606,9 +2606,9 @@ int oscar_chat_open(struct gaim_connection * gc, char *who)  	struct oscar_data * od = (struct oscar_data *)gc->proto_data;  	int ret;  	static int chat_id = 0; -	char * chatname = g_new0(char, strlen(gc->username)+4); +	char * chatname; -	g_snprintf(chatname, strlen(gc->username) + 4, "%s%d", gc->username, chat_id++); +	chatname = g_strdup_printf("%s%d", gc->username, chat_id++);  	ret = oscar_chat_join(gc, chatname); | 
