Mercurial > pidgin.yaz
diff libpurple/protocols/qq/file_trans.c @ 31639:4deef745de87
2010.01.23 - flos <lonicerae(at)gmail.com>
* added an option to force incoming message in chat room to use a default font instead of the font in message itself
2010.01.18 - flos <lonicerae(at)gmail.com>
* added type 'UPDCLS' and 'UID' for implementing business logic layer
2010.01.13 - ccpaging <ccpaging(at)gmail.com>
* qq2009-1 patch from ccpaging
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Sun, 06 Feb 2011 05:23:22 +0000 |
parents | de168bbf1e43 |
children | 1bf763879b96 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/file_trans.c Tue Feb 01 12:55:48 2011 +0000 +++ b/libpurple/protocols/qq/file_trans.c Sun Feb 06 05:23:22 2011 +0000 @@ -41,8 +41,8 @@ struct _qq_file_header { guint16 client_ver; guint8 file_key; - guint32 sender_uid; - guint32 receiver_uid; + UID sender_uid; + UID receiver_uid; }; typedef struct _qq_file_header qq_file_header; @@ -62,12 +62,12 @@ return _get_file_key(seed); } -static guint32 _decrypt_qq_uid(guint32 uid, guint32 key) +static guint32 _decrypt_qq_uid(UID uid, guint32 key) { return ~(uid ^ key); } -static guint32 _encrypt_qq_uid(guint32 uid, guint32 key) +static guint32 _encrypt_qq_uid(UID uid, guint32 key) { return (~uid) ^ key; } @@ -232,7 +232,7 @@ } #endif -static gint _qq_send_file(PurpleConnection *gc, guint8 *data, gint len, guint16 packet_type, guint32 to_uid) +static gint _qq_send_file(PurpleConnection *gc, guint8 *data, gint len, guint16 packet_type, UID to_uid) { guint8 *raw_data; gint bytes = 0; @@ -259,7 +259,7 @@ } /* send a file to udp channel with QQ_FILE_CONTROL_PACKET_TAG */ -void qq_send_file_ctl_packet(PurpleConnection *gc, guint16 packet_type, guint32 to_uid, guint8 hellobyte) +void qq_send_file_ctl_packet(PurpleConnection *gc, guint16 packet_type, UID to_uid, guint8 hellobyte) { qq_data *qd; gint bytes, bytes_expected, encrypted_len;