Mercurial > pidgin
comparison libpurple/protocols/qq/packet_parse.c @ 24143:c2253c485728
2008.10.04 - ccpaging <ccpagint(at)gmail.com>
* Update protocol for 2007
* Code cleanup
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:47:39 +0000 |
parents | 619ac2303c46 |
children | ec3f7d3e0445 |
comparison
equal
deleted
inserted
replaced
24142:df699d739b8f | 24143:c2253c485728 |
---|---|
149 | 149 |
150 /* pack four bytes as "guint32" into buf | 150 /* pack four bytes as "guint32" into buf |
151 * return the number of bytes packed, otherwise return -1 */ | 151 * return the number of bytes packed, otherwise return -1 */ |
152 gint qq_put32(guint8 *buf, guint32 dw) | 152 gint qq_put32(guint8 *buf, guint32 dw) |
153 { | 153 { |
154 guint32 dw_dest; | 154 guint32 dw_porter; |
155 memcpy(&dw_dest, buf, sizeof(dw_dest)); | |
156 | |
157 guint32 dw_porter; | |
158 dw_porter = g_htonl(dw); | 155 dw_porter = g_htonl(dw); |
159 #ifdef PARSER_DEBUG | 156 #ifdef PARSER_DEBUG |
160 purple_debug_info("QQ", "[DBG][put32] buf %p\n", (void *)buf); | 157 purple_debug_info("QQ", "[DBG][put32] buf %p\n", (void *)buf); |
161 purple_debug_info("QQ", "[DBG][put32] dw 0x%08x, dw_porter 0x%08x\n", dw, dw_porter); | 158 purple_debug_info("QQ", "[DBG][put32] dw 0x%08x, dw_porter 0x%08x\n", dw, dw_porter); |
162 #endif | 159 #endif |