soc.2010.msn-tlc: 586b6cf0: Drop Binary from the struct name.

masca at cpw.pidgin.im masca at cpw.pidgin.im
Fri Jun 4 21:35:44 EDT 2010


-----------------------------------------------------------------
Revision: 586b6cf0962bb00bafabd83bc6872b07f8236e50
Ancestor: 59e73b2dc4289a910a495d7b3093684eea2b46b9
Author: masca at cpw.pidgin.im
Date: 2010-06-03T21:50:45
Branch: im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/586b6cf0962bb00bafabd83bc6872b07f8236e50

Modified files:
        libpurple/protocols/msn/directconn.c
        libpurple/protocols/msn/directconn.h
        libpurple/protocols/msn/msg.c libpurple/protocols/msn/msg.h
        libpurple/protocols/msn/p2p.h
        libpurple/protocols/msn/slplink.c
        libpurple/protocols/msn/slplink.h

ChangeLog: 

Drop Binary from the struct name.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c	13bd0ad010cd9ad401de1b5b218b3bb247c034e4
+++ libpurple/protocols/msn/directconn.c	60f23f07985cc1fdb8e9cf34e5653582a69baadb
@@ -340,14 +340,14 @@ msn_dc_parse_binary_header(MsnDirectConn
 static void
 msn_dc_parse_binary_header(MsnDirectConn *dc)
 {
-	MsnP2PBinaryHeader *h;
-	MsnP2PBinaryHeader *context;
+	MsnP2PHeader *h;
+	MsnP2PHeader *context;
 
 	g_return_if_fail(dc != NULL);
 
 	h = &dc->header;
 	/* Skip packet size */
-	context = (MsnP2PBinaryHeader *)(dc->in_buffer + 4);
+	context = (MsnP2PHeader *)(dc->in_buffer + 4);
 
 	h->session_id = GUINT32_FROM_LE(context->session_id);
 	h->id = GUINT32_FROM_LE(context->id);
@@ -362,8 +362,8 @@ msn_dc_serialize_binary_header(MsnDirect
 
 static const gchar *
 msn_dc_serialize_binary_header(MsnDirectConn *dc) {
-	MsnP2PBinaryHeader *h;
-	static MsnP2PBinaryHeader bin_header;
+	MsnP2PHeader *h;
+	static MsnP2PHeader bin_header;
 
 	g_return_val_if_fail(dc != NULL, NULL);
 
@@ -480,7 +480,7 @@ msn_dc_send_handshake_with_nonce(MsnDire
 	h = msn_dc_serialize_binary_header(dc);
 	memcpy(p->data, h, P2P_PACKET_HEADER_SIZE);
 
-	memcpy(p->data + offsetof(MsnP2PBinaryHeader, ack_id), dc->nonce, 16);
+	memcpy(p->data + offsetof(MsnP2PHeader, ack_id), dc->nonce, 16);
 
 	msn_dc_enqueue_packet(dc, p);
 }
@@ -524,7 +524,7 @@ msn_dc_verify_handshake(MsnDirectConn *d
 	if (packet_length != P2P_PACKET_HEADER_SIZE)
 		return FALSE;
 
-	memcpy(nonce, dc->in_buffer + 4 + offsetof(MsnP2PBinaryHeader, ack_id), 16);
+	memcpy(nonce, dc->in_buffer + 4 + offsetof(MsnP2PHeader, ack_id), 16);
 
 	if (dc->nonce_type == DC_NONCE_PLAIN) {
 		if (memcmp(dc->nonce, nonce, 16) == 0) {
============================================================
--- libpurple/protocols/msn/directconn.h	9099a5aed644ee2b7a6b30b7b205b877a482e562
+++ libpurple/protocols/msn/directconn.h	ca15df57a2aaeb1fd19623530f507a66dce53594
@@ -100,7 +100,7 @@ struct _MsnDirectConn
 	GQueue  *out_queue; /**< The outgoing packet queue */
 	int     msg_pos;    /**< The position of next byte to be sent in the actual packet */
 
-	MsnP2PBinaryHeader    header; /**< SLP header for parsing / serializing */
+	MsnP2PHeader    header; /**< SLP header for parsing / serializing */
 
 	/** The callback used for sending information to the peer about the opened socket */
 	void (*send_connection_info_msg_cb)(MsnDirectConn *);
============================================================
--- libpurple/protocols/msn/msg.c	3b7c8045bb937838073ce3d4aa5f806eb1b28e6e
+++ libpurple/protocols/msn/msg.c	d27d28b3d407f3900ab8c517b135a9e5a5e5dc08
@@ -163,7 +163,7 @@ msn_message_parse_slp_body(MsnMessage *m
 void
 msn_message_parse_slp_body(MsnMessage *msg, const char *body, size_t len)
 {
-	MsnP2PBinaryHeader header;
+	MsnP2PHeader header;
 	const char *tmp;
 	int body_len;
 
@@ -298,7 +298,7 @@ msn_message_parse_payload(MsnMessage *ms
 	if (content_type != NULL &&
 		!strcmp(content_type, "application/x-msnmsgrp2p"))
 	{
-		MsnP2PBinaryHeader header;
+		MsnP2PHeader header;
 		MsnP2PFooter footer;
 		int body_len;
 
@@ -384,7 +384,7 @@ msn_message_gen_slp_body(MsnMessage *msg
 char *
 msn_message_gen_slp_body(MsnMessage *msg, size_t *ret_size)
 {
-	MsnP2PBinaryHeader header;
+	MsnP2PHeader header;
 
 	char *tmp, *base;
 	const void *body;
@@ -475,7 +475,7 @@ msn_message_gen_payload(MsnMessage *msg,
 
 	if (msg->msnslp_message)
 	{
-		MsnP2PBinaryHeader header;
+		MsnP2PHeader header;
 		MsnP2PFooter footer;
 
 		header.session_id = GUINT32_TO_LE(msg->msnslp_header.session_id);
============================================================
--- libpurple/protocols/msn/msg.h	12d4829a7efc0f9abf29a473ad1ac7ebe8671301
+++ libpurple/protocols/msn/msg.h	e5c664027c0f16e394bc4e571746cd8df3cbc9f9
@@ -89,7 +89,7 @@ struct _MsnMessage
 	guint total_chunks;   /**< How many chunks in this multi-part message */
 	guint received_chunks; /**< How many chunks we've received so far */
 
-	MsnP2PBinaryHeader msnslp_header;
+	MsnP2PHeader msnslp_header;
 	MsnP2PFooter msnslp_footer;
 
 	GHashTable *header_table;
============================================================
--- libpurple/protocols/msn/p2p.h	5a952a7acef5c34ff5d7e16e8793ca9c7602aa91
+++ libpurple/protocols/msn/p2p.h	b6db22ce1132964133d8db7228d0f6eee6fa9a74
@@ -15,7 +15,7 @@ typedef struct {
 	guint32 ack_sub_id;
 	guint64 ack_size;
 /*	guint8  body[1]; */
-} MsnP2PBinaryHeader;
+} MsnP2PHeader;
 #pragma pack(pop)
 
 typedef struct
@@ -40,7 +40,7 @@ typedef enum
  * #7180
  */
 
-#define P2P_PACKET_HEADER_SIZE sizeof(MsnP2PBinaryHeader)
+#define P2P_PACKET_HEADER_SIZE sizeof(MsnP2PHeader)
 
 
 #endif /* MSN_P2P_H */
============================================================
--- libpurple/protocols/msn/slplink.c	1a5634fa8e93ee6c30adfde0bb08bd1d65573fc7
+++ libpurple/protocols/msn/slplink.c	00100cc1f2425a41fc8081757b100e5c96e14eda
@@ -493,7 +493,7 @@ static MsnSlpMessage *
 }
 
 static MsnSlpMessage *
-msn_slplink_create_ack(MsnSlpLink *slplink, MsnP2PBinaryHeader *header)
+msn_slplink_create_ack(MsnSlpLink *slplink, MsnP2PHeader *header)
 {
 	MsnSlpMessage *slpmsg;
 
@@ -511,7 +511,7 @@ static void
 }
 
 static void
-msn_slplink_send_ack(MsnSlpLink *slplink, MsnP2PBinaryHeader *header)
+msn_slplink_send_ack(MsnSlpLink *slplink, MsnP2PHeader *header)
 {
 	MsnSlpMessage *slpmsg = msn_slplink_create_ack(slplink, header);
 
@@ -563,7 +563,7 @@ void
 }
 
 void
-msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PBinaryHeader *header, const char *data, gsize len)
+msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PHeader *header, const char *data, gsize len)
 {
 	MsnSlpMessage *slpmsg;
 	guint64 offset;
============================================================
--- libpurple/protocols/msn/slplink.h	75e772facbe1708e33b3324839306a5df671f472
+++ libpurple/protocols/msn/slplink.h	ce4dec96a931dde16578c5ac5a0148c8fbe020fc
@@ -81,7 +81,7 @@ void msn_slplink_send_queued_slpmsgs(Msn
 void msn_slplink_send_slpmsg(MsnSlpLink *slplink,
 							 MsnSlpMessage *slpmsg);
 void msn_slplink_send_queued_slpmsgs(MsnSlpLink *slplink);
-void msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PBinaryHeader *header, const char *data, gsize len);
+void msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PHeader *header, const char *data, gsize len);
 void msn_slplink_request_ft(MsnSlpLink *slplink, PurpleXfer *xfer);
 
 void msn_slplink_send_msg(MsnSlpLink *slplink, MsnMessage *msg);


More information about the Commits mailing list