comparison libpurple/protocols/gg/lib/handlers.c @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents e2ff2ac0e022
children
comparison
equal deleted inserted replaced
32692:0f94ec89f0bc 32827:4a34689eeb33
25 * 25 *
26 * \brief Funkcje obsługi przychodzących pakietów 26 * \brief Funkcje obsługi przychodzących pakietów
27 */ 27 */
28 28
29 #include <sys/types.h> 29 #include <sys/types.h>
30 #ifndef _WIN32
31 # include <sys/socket.h>
32 # include <netinet/in.h>
33 # include <arpa/inet.h>
34 #endif
35 #include <ctype.h> 30 #include <ctype.h>
36 #ifndef _WIN32 31 #ifdef sun
37 # ifdef sun 32 # include <sys/filio.h>
38 # include <sys/filio.h>
39 # endif
40 #endif 33 #endif
41 34
42 #include "compat.h" 35 #include "compat.h"
43 #include "libgadu.h" 36 #include "libgadu.h"
44 #include "libgadu-config.h"
45 #include "resolver.h" 37 #include "resolver.h"
46 #include "session.h" 38 #include "session.h"
47 #include "protocol.h" 39 #include "protocol.h"
48 #include "encoding.h" 40 #include "encoding.h"
49 #include "message.h" 41 #include "message.h"
50 #include "libgadu-internal.h" 42 #include "libgadu-internal.h"
51 #include "deflate.h" 43 #include "deflate.h"
52 44
53 #include <errno.h> 45 #include <errno.h>
54 #ifndef _WIN32
55 # include <netdb.h>
56 #endif
57 #include <stdarg.h> 46 #include <stdarg.h>
58 #include <stdio.h> 47 #include <stdio.h>
59 #include <stdlib.h> 48 #include <stdlib.h>
60 #include <string.h> 49 #include <string.h>
61 #include <signal.h> 50 #include <signal.h>
90 struct gg_welcome *w; 79 struct gg_welcome *w;
91 int ret; 80 int ret;
92 uint8_t hash_buf[64]; 81 uint8_t hash_buf[64];
93 uint32_t local_ip; 82 uint32_t local_ip;
94 struct sockaddr_in sin; 83 struct sockaddr_in sin;
95 unsigned int sin_len = sizeof(sin); 84 socklen_t sin_len = sizeof(sin);
96 85
97 if (len < sizeof(struct gg_welcome)) { 86 if (len < sizeof(struct gg_welcome)) {
98 ge->type = GG_EVENT_CONN_FAILED; 87 ge->type = GG_EVENT_CONN_FAILED;
99 ge->event.failure = GG_FAILURE_INVALID; 88 ge->event.failure = GG_FAILURE_INVALID;
100 gs->state = GG_STATE_IDLE; 89 gs->state = GG_STATE_IDLE;