Mercurial > pidgin
comparison libpurple/protocols/gg/lib/libgadu.c @ 29544:818f2845ab47
Finish making libgadu compile on Windows. Fixes #10542 finally!
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | kkszysiu@gmail.com |
---|---|
date | Sat, 06 Mar 2010 16:51:30 +0000 |
parents | db6735e579f8 |
children | 0665d7eff0a3 |
comparison
equal
deleted
inserted
replaced
29543:9cb96fe7e414 | 29544:818f2845ab47 |
---|---|
27 * | 27 * |
28 * \brief Główny moduł biblioteki | 28 * \brief Główny moduł biblioteki |
29 */ | 29 */ |
30 | 30 |
31 #include "libgadu.h" | 31 #include "libgadu.h" |
32 #include "libgadu-config.h" | |
32 #include "libgadu-internal.h" | 33 #include "libgadu-internal.h" |
33 | 34 |
34 #include <sys/types.h> | 35 #include <sys/types.h> |
35 | 36 |
36 #ifdef _WIN32 | 37 #ifdef _WIN32 |
409 */ | 410 */ |
410 void *gg_recv_packet(struct gg_session *sess) | 411 void *gg_recv_packet(struct gg_session *sess) |
411 { | 412 { |
412 struct gg_header h; | 413 struct gg_header h; |
413 char *buf = NULL; | 414 char *buf = NULL; |
414 int ret = 0; | 415 int ret = 0, offset, size = 0; |
415 unsigned int offset, size = 0; | |
416 | 416 |
417 gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_recv_packet(%p);\n", sess); | 417 gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_recv_packet(%p);\n", sess); |
418 | 418 |
419 if (!sess) { | 419 if (!sess) { |
420 errno = EFAULT; | 420 errno = EFAULT; |
607 h = (struct gg_header*) tmp; | 607 h = (struct gg_header*) tmp; |
608 h->type = gg_fix32(type); | 608 h->type = gg_fix32(type); |
609 h->length = gg_fix32(tmp_length - sizeof(struct gg_header)); | 609 h->length = gg_fix32(tmp_length - sizeof(struct gg_header)); |
610 | 610 |
611 if ((gg_debug_level & GG_DEBUG_DUMP)) { | 611 if ((gg_debug_level & GG_DEBUG_DUMP)) { |
612 unsigned int i; | 612 int i; |
613 | 613 |
614 gg_debug_session(sess, GG_DEBUG_DUMP, "// gg_send_packet(0x%.2x)", gg_fix32(h->type)); | 614 gg_debug_session(sess, GG_DEBUG_DUMP, "// gg_send_packet(0x%.2x)", gg_fix32(h->type)); |
615 for (i = 0; i < tmp_length; ++i) | 615 for (i = 0; i < tmp_length; ++i) |
616 gg_debug_session(sess, GG_DEBUG_DUMP, " %.2x", (unsigned char) tmp[i]); | 616 gg_debug_session(sess, GG_DEBUG_DUMP, " %.2x", (unsigned char) tmp[i]); |
617 gg_debug_session(sess, GG_DEBUG_DUMP, "\n"); | 617 gg_debug_session(sess, GG_DEBUG_DUMP, "\n"); |