comparison libpurple/protocols/qq/packet_parse.c @ 24077:ce94189f15ad

Flos Lonicerae <lonicerae(at)gmail.com> * Merge lonicerae and ccpaging into trunk
author SHiNE CsyFeK <csyfek@gmail.com>
date Wed, 22 Oct 2008 14:52:26 +0000
parents ec3f7d3e0445
children 52c5daee05c0
comparison
equal deleted inserted replaced
24076:ec3f7d3e0445 24077:ce94189f15ad
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