changeset 23750:d3262085b7a7

Fix up some types.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 10 Aug 2008 04:59:17 +0000
parents 5b5f92944d49
children 797377cbd5bf
files libpurple/protocols/msn/directconn.c libpurple/protocols/msn/httpconn.c libpurple/protocols/msn/servconn.c libpurple/protocols/msn/transaction.h
diffstat 4 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Sun Aug 10 01:21:17 2008 +0000
+++ b/libpurple/protocols/msn/directconn.c	Sun Aug 10 04:59:17 2008 +0000
@@ -162,13 +162,13 @@
 	return fd;
 }
 
-static size_t
+static gssize
 msn_directconn_write(MsnDirectConn *directconn,
 					 const char *data, size_t len)
 {
 	char *buffer, *tmp;
 	size_t buf_size;
-	size_t ret;
+	gssize ret;
 	guint32 sent_len;
 
 	g_return_val_if_fail(directconn != NULL, 0);
@@ -274,7 +274,8 @@
 {
 	MsnDirectConn* directconn;
 	char *body;
-	size_t len, body_len;
+	size_t body_len;
+	gssize len;
 
 	purple_debug_info("msn", "read_cb: %d, %d\n", source, cond);
 
--- a/libpurple/protocols/msn/httpconn.c	Sun Aug 10 01:21:17 2008 +0000
+++ b/libpurple/protocols/msn/httpconn.c	Sun Aug 10 04:59:17 2008 +0000
@@ -274,7 +274,8 @@
 	MsnSession *session;
 	char buf[MSN_BUF_LEN];
 	char *cur, *end, *old_rx_buf;
-	int len, cur_len;
+	gssize len;
+	int cur_len;
 	char *result_msg = NULL;
 	size_t result_len = 0;
 	gboolean error = FALSE;
@@ -405,7 +406,8 @@
 httpconn_write_cb(gpointer data, gint source, PurpleInputCondition cond)
 {
 	MsnHttpConn *httpconn;
-	int ret, writelen;
+	gssize ret;
+	int writelen;
 
 	httpconn = data;
 	writelen = purple_circ_buffer_get_max_read(httpconn->tx_buf);
@@ -727,7 +729,8 @@
 	}
 	else
 	{
-		purple_debug_error("msn", "HTTP: Connection error\n");
+		purple_debug_error("msn", "HTTP: Connection error: %s\n",
+		                   error_message ? error_message : "(null)");
 		msn_servconn_got_error(httpconn->servconn, MSN_SERVCONN_ERROR_CONNECT);
 	}
 }
--- a/libpurple/protocols/msn/servconn.c	Sun Aug 10 01:21:17 2008 +0000
+++ b/libpurple/protocols/msn/servconn.c	Sun Aug 10 04:59:17 2008 +0000
@@ -301,7 +301,8 @@
 servconn_write_cb(gpointer data, gint source, PurpleInputCondition cond)
 {
 	MsnServConn *servconn = data;
-	int ret, writelen;
+	gssize ret;
+	int writelen;
 
 	writelen = purple_circ_buffer_get_max_read(servconn->tx_buf);
 
@@ -385,7 +386,8 @@
 	MsnSession *session;
 	char buf[MSN_BUF_LEN];
 	char *cur, *end, *old_rx_buf;
-	int len, cur_len;
+	gssize len;
+	int cur_len;
 
 	servconn = data;
 	session = servconn->session;
@@ -399,7 +401,7 @@
 
 	} else if (len <= 0) {
 		purple_debug_error("msn", "servconn read error,"
-		                          "len: %d, errno: %d, error: %s\n",
+		                          "len: %" G_GSSIZE_FORMAT ", errno: %d, error: %s\n",
 		                          len, errno, g_strerror(errno));
 		msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_READ);
 
--- a/libpurple/protocols/msn/transaction.h	Sun Aug 10 01:21:17 2008 +0000
+++ b/libpurple/protocols/msn/transaction.h	Sun Aug 10 04:59:17 2008 +0000
@@ -45,7 +45,7 @@
 	char *command;
 	char *params;
 
-	int timer;
+	guint timer;
 
 	void *data; /**< The data to be used on the different callbacks. */
 	GHashTable *callbacks;