changeset 30014:b1cda3f8fdc9

De-spacify.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 18 Mar 2010 03:15:01 +0000
parents 119bd7b072eb
children bcb5e6c2e5a3
files libpurple/protocols/msn/directconn.c libpurple/protocols/msn/directconn.h libpurple/protocols/msn/slp.c libpurple/protocols/msn/slp.h libpurple/protocols/msn/slpcall.h libpurple/protocols/msn/slplink.c
diffstat 6 files changed, 127 insertions(+), 127 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Wed Mar 17 03:45:07 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Thu Mar 18 03:15:01 2010 +0000
@@ -49,7 +49,7 @@
 	PurpleCipherContext	*context = NULL;
 	static guchar		digest[20];
 	int			i;
-	
+
 	guint32			g1;
 	guint16			g2;
 	guint16			g3;
@@ -57,7 +57,7 @@
 
 	cipher = purple_ciphers_find_cipher("sha1");
 	g_return_if_fail(cipher != NULL);
-	
+
 	for (i = 0; i < 16; i++)
 		dc->nonce[i] = rand() & 0xff;
 
@@ -68,16 +68,16 @@
 
 	g1 = *((guint32*)(digest + 0));
 	g1 = GUINT32_FROM_LE(g1);
-	
+
 	g2 = *((guint16*)(digest + 4));
 	g2 = GUINT16_FROM_LE(g2);
-	
+
 	g3 = *((guint16*)(digest + 6));
 	g3 = GUINT32_FROM_LE(g3);
-	
+
 	g4 = *((guint64*)(digest + 8));
 	g4 = GUINT64_FROM_BE(g4);
-	
+
 	g_sprintf(
 		dc->nonce_hash,
 		"%08X-%04X-%04X-%04X-%08X%04X",
@@ -108,7 +108,7 @@
 {
 	if (p->data)
 		g_free(p->data);
-	
+
 	if (p->msg)
 		msn_message_unref(p->msg);
 
@@ -123,7 +123,7 @@
 	purple_debug_info("msn", "msn_dc_new\n");
 
 	g_return_val_if_fail(slpcall != NULL, NULL);
-	
+
 	dc = g_new0(MsnDirectConn, 1);
 
 	dc->slplink = slpcall->slplink;
@@ -163,16 +163,16 @@
 msn_dc_destroy(MsnDirectConn *dc)
 {
 	MsnSlpLink	*slplink;
-	
+
 	purple_debug_info("msn", "msn_dc_destroy\n");
-	
+
 	g_return_if_fail(dc != NULL);
 
 	slplink = dc->slplink;
 
 	if (dc->slpcall != NULL)
 		dc->slpcall->wait_for_socket = FALSE;
-	
+
 	slplink->dc = NULL;
 
 	if (slplink->swboard == NULL)
@@ -182,7 +182,7 @@
 		g_free(dc->msg_body);
 		dc->msg_body = NULL;
 	}
-	
+
 	if (dc->prev_ack) {
 		msn_slpmsg_destroy(dc->prev_ack);
 		dc->prev_ack = NULL;
@@ -192,38 +192,38 @@
 		purple_network_listen_cancel(dc->listen_data);
 		dc->listen_data = NULL;
 	}
-	
+
 	if (dc->connect_data != NULL) {
 		purple_proxy_connect_cancel(dc->connect_data);
 		dc->connect_data = NULL;
 	}
-	
+
 	if (dc->listenfd != -1) {
 		purple_network_remove_port_mapping(dc->listenfd);
 		close(dc->listenfd);
 		dc->listenfd = -1;
 	}
-	
+
 	if (dc->listenfd_handle != 0) {
 		purple_timeout_remove(dc->listenfd_handle);
 		dc->listenfd_handle = 0;
 	}
-	
+
 	if (dc->connect_timeout_handle != 0) {
 		purple_timeout_remove(dc->connect_timeout_handle);
 		dc->connect_timeout_handle = 0;
 	}
-	
+
 	if (dc->fd != -1) {
 		close(dc->fd);
 		dc->fd = -1;
 	}
-	
+
 	if (dc->send_handle != 0) {
 		purple_input_remove(dc->send_handle);
 		dc->send_handle = 0;
 	}
-	
+
 	if (dc->recv_handle != 0) {
 		purple_input_remove(dc->recv_handle);
 		dc->recv_handle = 0;
@@ -233,7 +233,7 @@
 		g_free(dc->in_buffer);
 		dc->in_buffer = NULL;
 	}
-	
+
 	if (dc->out_queue != NULL) {
 		while (!g_queue_is_empty(dc->out_queue))
 			msn_dc_destroy_packet( g_queue_pop_head(dc->out_queue) );
@@ -268,7 +268,7 @@
 {
 	g_return_if_fail(dc != NULL);
 
-	
+
 	if (dc->num_calls > 0) {
 		dc->num_calls--;
 	}
@@ -281,7 +281,7 @@
 	MsnSlpCall	*slpcall;
 	MsnSlpMessage	*msg;
 	gchar		*header;
-	
+
 	purple_debug_info("msn", "msn_dc_send_invite\n");
 
 	g_return_if_fail(dc != NULL);
@@ -293,7 +293,7 @@
 		"INVITE MSNMSGR:%s MSNSLP/1.0",
 		slpcall->slplink->remote_user
 	);
-	
+
 	msg = msn_slpmsg_sip_new(
 		slpcall,
 		0,
@@ -313,9 +313,9 @@
 msn_dc_send_ok(MsnDirectConn *dc)
 {
 	purple_debug_info("msn", "msn_dc_send_ok\n");
-	
+
 	g_return_if_fail(dc != NULL);
-	
+
 	msn_slp_send_ok(dc->slpcall, dc->slpcall->branch,
 		"application/x-msnmsgr-transrespbody", dc->msg_body);
 	g_free(dc->msg_body);
@@ -332,17 +332,17 @@
 {
 	MsnSlpCall	*slpcall;
 	PurpleXfer	*xfer;
-	
+
 	purple_debug_info("msn", "msn_dc_try_fallback_to_p2p\n");
-	
+
 	g_return_if_fail(dc != NULL);
 
 	slpcall = dc->slpcall;
 	g_return_if_fail(slpcall != NULL);
-	
+
 	xfer = slpcall->xfer;
 	g_return_if_fail(xfer != NULL);
-		
+
 	msn_dc_destroy(dc);
 
 	msn_slpcall_session_init(slpcall);
@@ -359,7 +359,7 @@
 		slpcall->end_cb = NULL;
 		slpcall->progress_cb = NULL;
 		slpcall->cb = NULL;
-	
+
 		if (fail_local)
 			purple_xfer_cancel_local(xfer);
 		else
@@ -371,7 +371,7 @@
 		slpcall->end_cb = NULL;
 		slpcall->progress_cb = NULL;
 		slpcall->cb = NULL;
-		
+
 		if (fail_local)
 			purple_xfer_cancel_local(xfer);
 		else
@@ -396,7 +396,7 @@
 
 	memcpy(&h->session_id, buffer + DC_SESSION_ID_OFFS, sizeof(h->session_id));
 	h->session_id = GUINT32_FROM_LE(h->session_id);
-	
+
 	memcpy(&h->id, buffer + DC_SEQ_ID_OFFS, sizeof(h->id));
 	h->id = GUINT32_FROM_LE(h->id);
 
@@ -426,14 +426,14 @@
 msn_dc_serialize_binary_header(MsnDirectConn *dc) {
 	static MsnSlpHeader		h;
 	static gchar			bin_header[DC_PACKET_HEADER_SIZE];
-	
+
 	g_return_val_if_fail(dc != NULL, NULL);
 
 	memcpy(&h, &dc->header, sizeof(h));
 
 	h.session_id = GUINT32_TO_LE(h.session_id);
 	memcpy(bin_header + DC_SESSION_ID_OFFS, &h.session_id, sizeof(h.session_id));
-	
+
 	h.id = GUINT32_TO_LE(h.id);
 	memcpy(bin_header + DC_SEQ_ID_OFFS, &h.id, sizeof(h.id));
 
@@ -469,19 +469,19 @@
 	PurpleAccount	*account;
 	char		*body;
 	int		body_len;
-	
+
 	purple_debug_info("msn", "msn_dc_send_bye\n");
-	
+
 	g_return_if_fail(dc != NULL);
 	g_return_if_fail(dc->slpcall != NULL);
 
 	slplink = dc->slpcall->slplink;
 	account = slplink->session->account;
-	
+
 	dc->header.session_id = 0;
 	dc->header.id = dc->slpcall->slplink->slp_seq_id++;
-	dc->header.offset = 0; 
-	
+	dc->header.offset = 0;
+
 	body = g_strdup_printf(
 		"BYE MSNMSGR:%s MSNSLP/1.0\r\n"
 		"To: <msnmsgr:%s>\r\n"
@@ -517,7 +517,7 @@
 msn_dc_send_ack(MsnDirectConn *dc)
 {
 	g_return_if_fail(dc != NULL);
-	
+
 	dc->header.session_id = 0;
 	dc->header.ack_sub_id = dc->header.ack_id;
 	dc->header.ack_id = dc->header.id;
@@ -534,7 +534,7 @@
 msn_dc_send_data_ack(MsnDirectConn *dc)
 {
 	g_return_if_fail(dc != NULL);
-	
+
 	dc->header.session_id = dc->slpcall->session_id;
 	dc->header.ack_sub_id = dc->header.ack_id;
 	dc->header.ack_id = dc->header.id;
@@ -552,9 +552,9 @@
 {
 	MsnSlpCall	*slpcall;
 	MsnDirectConn	*dc;
-	
+
 	purple_debug_info("msn", "msn_dc_xfer_send_cancel\n");
-	
+
 	g_return_if_fail(xfer != NULL);
 
 	slpcall = xfer->data;
@@ -562,7 +562,7 @@
 
 	dc = slpcall->dc;
 	g_return_if_fail(dc != NULL);
-	
+
 	switch (dc->state) {
 	case DC_STATE_TRANSFER:
 		msn_dc_send_bye(dc);
@@ -580,7 +580,7 @@
 {
 	MsnSlpCall	*slpcall;
 	MsnDirectConn	*dc;
-	
+
 	purple_debug_info("msn", "msn_dc_xfer_recv_cancel\n");
 
 	g_return_if_fail(xfer != NULL);
@@ -614,7 +614,7 @@
 
 	g_return_if_fail(dc != NULL);
 	g_return_if_fail(fd != -1);
-	
+
 	if(g_queue_is_empty(dc->out_queue)) {
 		if (dc->send_handle != 0) {
 			purple_input_remove(dc->send_handle);
@@ -645,7 +645,7 @@
 
 		g_queue_pop_head(dc->out_queue);
 		msn_dc_destroy_packet(p);
-		
+
 		dc->msg_pos = 0;
 	}
 }
@@ -654,7 +654,7 @@
 msn_dc_enqueue_packet(MsnDirectConn *dc, MsnDirectConnPacket *p)
 {
 	gboolean			was_empty;
-	
+
 	was_empty = g_queue_is_empty(dc->out_queue);
 	g_queue_push_tail(dc->out_queue, p);
 
@@ -668,9 +668,9 @@
 msn_dc_send_foo(MsnDirectConn *dc)
 {
 	MsnDirectConnPacket	*p;
-	
+
 	purple_debug_info("msn", "msn_dc_send_foo\n");
-	
+
 	g_return_if_fail(dc != NULL);
 
 	p = msn_dc_new_packet();
@@ -699,7 +699,7 @@
 	l = DC_PACKET_HEADER_SIZE;
 	l = GUINT32_TO_LE(l);
 	memcpy(p->data, &l, 4);
-	
+
 	dc->header.session_id = 0;
 	dc->header.id = dc->slpcall->slplink->slp_seq_id++;
 	dc->header.offset = 0;
@@ -716,7 +716,7 @@
 
 static void
 msn_dc_send_handshake_reply(MsnDirectConn *dc)
-{	
+{
 	MsnDirectConnPacket	*p;
 	gchar			*h;
 	guint32			l;
@@ -731,7 +731,7 @@
 	l = DC_PACKET_HEADER_SIZE;
 	l = GUINT32_TO_LE(l);
 	memcpy(p->data, &l, 4);
-	
+
 	dc->header.id = dc->slpcall->slplink->slp_seq_id++;
 	dc->header.length = 0;
 
@@ -800,16 +800,16 @@
 		dc->slpcall = NULL;
 		break;
 		}
-	
+
 	case DC_STATE_HANDSHAKE_REPLY:
 		/* TODO: Check! */
 		dc->state = DC_STATE_ESTABILISHED;
-		
+
 		msn_slpcall_session_init(dc->slpcall);
 		dc->slpcall = NULL;
 		break;
 
-	case DC_STATE_ESTABILISHED: 
+	case DC_STATE_ESTABILISHED:
 		msn_slplink_process_msg(
 			dc->slplink,
 			&dc->header,
@@ -835,7 +835,7 @@
 		if (packet_length < DC_PACKET_HEADER_SIZE)
 			return DC_TRANSFER_FALLBACK;
 
-		/* 
+		/*
 		 * TODO: MSN Messenger 7.0 sends BYE with flags 0x0000000 so we'll get rid of
 		 * 0x1000000 bit but file data is always sent with flags 0x1000030 in both
 		 * MSN Messenger and Live.*/
@@ -856,7 +856,7 @@
 			file_size = purple_xfer_get_size(xfer);
 
 			/* Packet sanity checks */
-			if (	h->session_id != dc->slpcall->session_id || 
+			if (	h->session_id != dc->slpcall->session_id ||
 				h->offset >= file_size ||
 				h->total_size != file_size ||
 				h->length != packet_length - DC_PACKET_HEADER_SIZE ||
@@ -876,7 +876,7 @@
 
 			xfer->bytes_sent = (h->offset + h->length);
 			xfer->bytes_remaining = h->total_size - xfer->bytes_sent;
-		
+
 			purple_xfer_update_progress(xfer);
 
 			if (xfer->bytes_remaining == 0) {
@@ -887,11 +887,11 @@
 			}
 			break;
 		default:
-			/* 
+			/*
 			 * TODO: Packet with unknown flags. Should we ACK these?
 			 */
 			msn_dc_send_ack(dc);
-			
+
 			purple_debug_warning(
 				"msn",
 				"msn_dc_recv_process_packet_cb: received packet with unknown flags: 0x%08x\n",
@@ -914,7 +914,7 @@
 			break;
 
 		default:
-			/* 
+			/*
 			 * TODO: Packet with unknown flags. Should we ACK these?
 			 */
 			msn_dc_send_ack(dc);
@@ -938,13 +938,13 @@
 	int		free_buf_space;
 	int		bytes_received;
 	guint32		packet_length;
-	
+
 	g_return_if_fail(data != NULL);
 	g_return_if_fail(fd != -1);
 
 	dc = data;
 	free_buf_space = dc->in_size - dc->in_pos;
-		
+
 	bytes_received = recv(fd, dc->in_buffer + dc->in_pos, free_buf_space, 0);
 	if (bytes_received < 0) {
 		if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
@@ -961,14 +961,14 @@
 	} else if (bytes_received == 0) {
 		/* EOF. Remote side closed connection. */
 		purple_debug_info("msn", "msn_dc_recv_cb: recv EOF\n");
-		
+
 		if(dc->state != DC_STATE_ESTABILISHED)
 			msn_dc_fallback_to_p2p(dc);
 		else
 			msn_dc_destroy(dc);
 		return;
 	}
-	
+
 	dc->progress = TRUE;
 
 	dc->in_pos += bytes_received;
@@ -977,7 +977,7 @@
 	while (dc->in_pos >= 4) {
 		packet_length = *((guint32*)dc->in_buffer);
 		packet_length = GUINT32_FROM_LE(packet_length);
-		
+
 		if (packet_length > DC_MAX_PACKET_SIZE) {
 			/* Oversized packet */
 			purple_debug_warning("msn", "msn_dc_recv_cb: oversized packet received\n");
@@ -987,7 +987,7 @@
 		/* Wait for the whole packet to arrive */
 		if (dc->in_pos < 4 + packet_length)
 			return;
-	
+
 		if (dc->state != DC_STATE_FOO) {
 			msn_dc_parse_binary_header(dc);
 		}
@@ -1000,7 +1000,7 @@
 			purple_debug_warning("msn", "msn_dc_recv_cb: packet processing error, fall back to p2p\n");
 			msn_dc_fallback_to_p2p(dc);
 			return;
-		
+
 		}
 
 		if (dc->in_pos > packet_length + 4) {
@@ -1027,12 +1027,12 @@
 
 	PurpleXfer	*xfer;
 	int		bytes_read;
-	
+
 	g_return_val_if_fail(dc != NULL, FALSE);
 	g_return_val_if_fail(dc->slpcall != NULL, FALSE);
 
 	xfer = dc->slpcall->xfer;
-	
+
 	bytes_read = fread(dc->buffer, 1, DC_MAX_BODY_SIZE, xfer->dest_fp);
 
 	if (bytes_read > 0) {
@@ -1052,10 +1052,10 @@
 		xfer->bytes_sent += bytes_read;
 		xfer->bytes_remaining -= bytes_read;
 		purple_xfer_update_progress(xfer);
-		
+
 		if (xfer->bytes_remaining == 0) {
 			purple_xfer_set_completed(xfer, TRUE);
-			
+
 			/* Increment seq. ID for the next BYE message */
 			dc->slpcall->slplink->slp_seq_id++;
 			dc->state = DC_STATE_DATA_ACK;
@@ -1074,7 +1074,7 @@
 msn_dc_send_process_packet_cb(MsnDirectConn *dc, guint32 packet_length)
 {
 	g_return_val_if_fail(dc != NULL, DC_TRANSFER_CANCELLED);
-	
+
 	switch (dc->state) {
 	case DC_STATE_FOO: {
 		if (packet_length != 4)
@@ -1094,7 +1094,7 @@
 		/* TODO: Check! */
 		msn_dc_send_handshake_reply(dc);
 		dc->state = DC_STATE_TRANSFER;
-		
+
 		purple_xfer_set_request_denied_fnc(dc->slpcall->xfer, msn_dc_xfer_send_cancel);
 		purple_xfer_set_cancel_send_fnc(dc->slpcall->xfer, msn_dc_xfer_send_cancel);
 		purple_xfer_set_end_fnc(dc->slpcall->xfer, msn_dc_xfer_end);
@@ -1106,7 +1106,7 @@
 		/* TODO: Check! */
 		dc->state = DC_STATE_TRANSFER;
 		break;
-		
+
 	case DC_STATE_TRANSFER: {
 		switch (dc->header.flags) {
 		case 0x0000000:
@@ -1143,7 +1143,7 @@
 msn_dc_timeout(gpointer data)
 {
 	MsnDirectConn	*dc = data;
-	
+
 	g_return_val_if_fail(dc != NULL, FALSE);
 
 	if (dc->progress)
@@ -1158,7 +1158,7 @@
 msn_dc_init(MsnDirectConn *dc)
 {
 	g_return_if_fail(dc != NULL);
-	
+
 	dc->in_size = DC_MAX_PACKET_SIZE + 4;
 	dc->in_pos = 0;
 	dc->in_buffer = g_malloc(dc->in_size);
@@ -1175,7 +1175,7 @@
 	MsnDirectConn	*dc;
 
 	purple_debug_info("msn", "msn_dc_connected_to_peer_cb\n");
-	
+
 	g_return_if_fail(data != NULL);
 
 	dc = data;
@@ -1183,7 +1183,7 @@
 	dc->connect_data = NULL;
 	purple_timeout_remove(dc->connect_timeout_handle);
 	dc->connect_timeout_handle = 0;
-	
+
 	dc->fd = fd;
 	if (dc->fd != -1) {
 		msn_dc_init(dc);
@@ -1193,7 +1193,7 @@
 	}
 }
 
-/* 
+/*
  * This callback will be called when we're the server
  * and nobody has connected us in DC_CONNECT_TIMEOUT seconds
  */
@@ -1201,15 +1201,15 @@
 msn_dc_incoming_connection_timeout_cb(gpointer data) {
 	MsnDirectConn	*dc = data;
 	MsnSlpCall	*slpcall = dc->slpcall;
-	
+
 	purple_debug_info("msn", "msn_dc_incoming_connection_timeout_cb\n");
-	
+
 	dc = data;
 	g_return_val_if_fail(dc != NULL, FALSE);
 
 	slpcall = dc->slpcall;
 	g_return_val_if_fail(slpcall != NULL, FALSE);
-	
+
 	if (dc->listen_data != NULL) {
 		purple_network_listen_cancel(dc->listen_data);
 		dc->listen_data = NULL;
@@ -1241,11 +1241,11 @@
 msn_dc_outgoing_connection_timeout_cb(gpointer data)
 {
 	MsnDirectConn	*dc = data;
-	
+
 	purple_debug_info("msn", "msn_dc_outgoing_connection_timeout_cb\n");
 
 	g_return_val_if_fail(dc != NULL, FALSE);
-	
+
 	if (dc->connect_timeout_handle != 0) {
 		purple_timeout_remove(dc->connect_timeout_handle);
 		dc->connect_timeout_handle = 0;
@@ -1293,7 +1293,7 @@
 	return FALSE;
 }
 
-/* 
+/*
  * This callback will be called when we're the server
  * and somebody has connected to us in DC_CONNECT_TIMEOUT seconds.
  */
@@ -1301,11 +1301,11 @@
 msn_dc_incoming_connection_cb(gpointer data, gint listenfd, PurpleInputCondition cond)
 {
 	MsnDirectConn	*dc = data;
-	
+
 	purple_debug_info("msn", "msn_dc_incoming_connection_cb\n");
 
 	g_return_if_fail(dc != NULL);
-	
+
 	if (dc->connect_timeout_handle != 0) {
 		purple_timeout_remove(dc->connect_timeout_handle);
 		dc->connect_timeout_handle = 0;
@@ -1315,7 +1315,7 @@
 		purple_input_remove(dc->listenfd_handle);
 		dc->listenfd_handle = 0;
 	}
-	
+
 	dc->fd = accept(listenfd, NULL, 0);
 
 	purple_network_remove_port_mapping(dc->listenfd);
@@ -1334,9 +1334,9 @@
 	MsnDirectConn		*dc = data;
 
 	purple_debug_info("msn", "msn_dc_listen_socket_created_cb\n");
-	
+
 	g_return_if_fail(dc != NULL);
-	
+
 	dc->listen_data = NULL;
 
 	if (listenfd != -1) {
--- a/libpurple/protocols/msn/directconn.h	Wed Mar 17 03:45:07 2010 +0000
+++ b/libpurple/protocols/msn/directconn.h	Thu Mar 18 03:15:01 2010 +0000
@@ -91,7 +91,7 @@
 	int			msg_pos;		/**< The position of next byte to be sent in the actual packet */
 
 	MsnSlpHeader		header;			/**< SLP header for parsing / serializing */
-	
+
 							/**< The callback used for sending information to the peer about the opened scoket */
 	void			(*send_connection_info_msg_cb)(struct _MsnDirectConn*);
 
--- a/libpurple/protocols/msn/slp.c	Wed Mar 17 03:45:07 2010 +0000
+++ b/libpurple/protocols/msn/slp.c	Thu Mar 18 03:15:01 2010 +0000
@@ -113,7 +113,7 @@
 
 	slpcall = xfer->data;
 
-	
+
 	if (purple_xfer_get_status(xfer) == PURPLE_XFER_STATUS_CANCEL_LOCAL)
 	{
 		if (slpcall->started)
@@ -329,19 +329,19 @@
 	/* A direct connection negotiation response */
 	char		*bridge;
 	MsnDirectConn	*dc = slpcall->slplink->dc;
-	
+
 	purple_debug_info("msn", "process_transresp\n");
-	
+
 	g_return_val_if_fail(dc != NULL, FALSE);
-	g_return_val_if_fail(dc->state == DC_STATE_CLOSED, FALSE); 
+	g_return_val_if_fail(dc->state == DC_STATE_CLOSED, FALSE);
 
 	bridge = get_token(content, "Bridge: ", "\r\n");
 	if(bridge && strcmp(bridge, "TCPv1") == 0) {
 		/* Ok, the client supports direct TCP connection */
-		
+
 		if (dc->listen_data != NULL || dc->listenfd != -1) {
 			if (dc->listen_data != NULL) {
-				/* 
+				/*
 				 * We'll listen for incoming connections but
 				 * the listening socket isn't ready yet so we cannot
 				 * send the INVITE packet now. Put the slpcall into waiting mode
@@ -678,14 +678,14 @@
 	{
 		/* A direct connection negotiation request */
 		char		*bridges;
-			
+
 		purple_debug_info("msn", "got_invite: transreqbody received\n");
-		
+
 		g_return_if_fail(slpcall->xfer != NULL);
 
 		/* Don't do anything if we already have a direct connection */
 		g_return_if_fail(slpcall->slplink->dc == NULL);
-		
+
 		bridges = get_token(content, "Bridges: ", "\r\n");
 		if(bridges && strstr(bridges, "TCPv1") != NULL) {
 			/*
@@ -706,9 +706,9 @@
 
 			if (dc->listen_data == NULL) {
 				/* Listen socket creation failed */
-				
+
 				purple_debug_info("msn", "got_invite: listening failed\n");
-				
+
 				content = g_strdup(
 					"Bridge: TCPv1\r\n"
 					"Listening: false\r\n"
@@ -720,20 +720,20 @@
 				g_free(content);
 
 			} else {
-				/* 
+				/*
 				 * Listen socket created successfully.
 				 * Don't send anything here because we don't know the parameters
 				 * of the created socket yet. msn_dc_send_ok will be called from
 				 * the callback function: dc_listen_socket_created_cb
 				 */
 				purple_debug_info("msn", "got_invite: listening socket created\n");
-			
+
 				dc->send_connection_info_msg_cb = msn_dc_send_ok;
 				slpcall->wait_for_socket = TRUE;
 			}
 
 		} else {
-			/* 
+			/*
 			 * Invalid direct connect invitation or
 			 * TCP connection is not supported.
 			 */
@@ -743,7 +743,7 @@
 	{
 		/* A direct connection negotiation response */
 		g_return_if_fail(slpcall->xfer != NULL);
-		
+
 		msn_slp_process_transresp(slpcall, content);
 #if 0
 		char *ip_addrs;
@@ -790,16 +790,16 @@
 		g_return_if_fail(slpcall->xfer != NULL);
 
 		if(slpcall->slplink->dc != NULL) {
-			/* 
+			/*
 			 * If we already have an estabilished direct connection
 			 * then just start the transfer.
 			 */
 			msn_slpcall_session_init(slpcall);
 			return;
 		}
-		
+
 		/* Try direct file transfer by sending a second INVITE */
-		
+
 		dc = msn_dc_new(slpcall);
 		slpcall->branch = rand_guid();
 
@@ -809,7 +809,7 @@
 			msn_dc_listen_socket_created_cb,
 			dc
 		);
-			
+
 		header = g_strdup_printf(
 			"INVITE MSNMSGR:%s MSNSLP/1.0",
 			slpcall->slplink->remote_user
@@ -834,9 +834,9 @@
 
 		} else {
 			/* Listen socket created successfully. */
-			
+
 			purple_debug_info("msn", "got_ok: listening socket created\n");
-			
+
 			content = g_strdup_printf(
 				"Bridges: TCPv1\r\n"
 				"NetID: 0\r\n"
@@ -849,7 +849,7 @@
 				dc->nonce_hash
 			);
 		}
-		
+
 		msg = msn_slpmsg_sip_new(
 			slpcall,
 			0,
@@ -906,7 +906,7 @@
 			msn_slpcall_session_init(slpcall);
 		}
 #else
-		/* 
+		/*
 		 * Removed because it messes up direct connection by
 		 * starting p2p transfer
 		 */
--- a/libpurple/protocols/msn/slp.h	Wed Mar 17 03:45:07 2010 +0000
+++ b/libpurple/protocols/msn/slp.h	Thu Mar 18 03:15:01 2010 +0000
@@ -54,7 +54,7 @@
 void
 msn_slp_send_ok(MsnSlpCall *slpcall, const char *branch,
 		const char *type, const char *content);
-		
+
 void
 msn_slp_send_decline(MsnSlpCall *slpcall, const char *branch,
 			 const char *type, const char *content);
--- a/libpurple/protocols/msn/slpcall.h	Wed Mar 17 03:45:07 2010 +0000
+++ b/libpurple/protocols/msn/slpcall.h	Thu Mar 18 03:15:01 2010 +0000
@@ -72,7 +72,7 @@
 
 	/* Can be checksum, or smile */
 	char *data_info;
-	
+
 	PurpleXfer *xfer;
 	union {
 		GByteArray *incoming_data;
--- a/libpurple/protocols/msn/slplink.c	Wed Mar 17 03:45:07 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Thu Mar 18 03:15:01 2010 +0000
@@ -169,7 +169,7 @@
 	if (slplink->dc != NULL && slplink->dc->state == DC_STATE_ESTABILISHED)
 		msn_dc_unref(slplink->dc);
 	*/
-	
+
 	slplink->slp_calls = g_list_remove(slplink->slp_calls, slpcall);
 
 	/* The slplink has no slpcalls in it, release it from MSN_SB_FLAG_FT.
@@ -645,14 +645,14 @@
 	{
 		/* All the pieces of the slpmsg have been received */
 		MsnSlpCall *slpcall;
-	
+
 		slpcall = msn_slp_process_msg(slplink, slpmsg);
 
 		if (slpcall == NULL) {
 			msn_slpmsg_destroy(slpmsg);
 			return;
 		}
-		
+
 		purple_debug_info("msn", "msn_slplink_process_msg: slpmsg complete\n");
 
 		/*if (!slpcall->wasted) {*/
@@ -666,12 +666,12 @@
 					msn_directconn_send_handshake(directconn);
 #endif
 			}
-			else if (slpmsg->flags == 0x00 || slpmsg->flags == 0x1000000 ||  
-				 slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 ||  
+			else if (slpmsg->flags == 0x00 || slpmsg->flags == 0x1000000 ||
+				 slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 ||
 				 slpmsg->flags == 0x1000030)
 			{
 				/* Release all the messages and send the ACK */
-			
+
 				if (slpcall != NULL && slpcall->wait_for_socket) {
 					/*
 					 * Save ack for later because we have to send
@@ -679,13 +679,13 @@
 					 * invitation before ACK but the listening socket isn't
 					 * created yet.
 					 */
-					
+
 					purple_debug_info("msn", "msn_slplink_process_msg: save ACK\n");
-					
+
 					slpcall->slplink->dc->prev_ack = msn_slplink_create_ack(slplink, header);
 				} else {
 					purple_debug_info("msn", "msn_slplink_process_msg: send ACK\n");
-					
+
 					msn_slplink_send_ack(slplink, header);
 					msn_slplink_send_queued_slpmsgs(slplink);
 				}