Mercurial > pidgin
comparison libpurple/protocols/gg/lib/dcc7.c @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | 3a90a59ddea2 |
children |
comparison
equal
deleted
inserted
replaced
32671:0e69949b3e61 | 32672:3828a61c44da |
---|---|
29 * \brief Obsługa połączeń bezpośrednich od wersji Gadu-Gadu 7.x | 29 * \brief Obsługa połączeń bezpośrednich od wersji Gadu-Gadu 7.x |
30 */ | 30 */ |
31 | 31 |
32 #include <sys/types.h> | 32 #include <sys/types.h> |
33 #include <sys/stat.h> | 33 #include <sys/stat.h> |
34 #ifndef _WIN32 | 34 #ifdef sun |
35 # include <sys/ioctl.h> | 35 # include <sys/filio.h> |
36 # include <sys/socket.h> | |
37 # include <netinet/in.h> | |
38 # include <arpa/inet.h> | |
39 # ifdef sun | |
40 # include <sys/filio.h> | |
41 # endif | |
42 #endif | 36 #endif |
43 #include <time.h> | 37 #include <time.h> |
44 | 38 |
45 #include <ctype.h> | 39 #include <ctype.h> |
46 #include <errno.h> | 40 #include <errno.h> |
1093 } | 1087 } |
1094 | 1088 |
1095 case GG_STATE_CONNECTING: | 1089 case GG_STATE_CONNECTING: |
1096 { | 1090 { |
1097 int res = 0, error = 0; | 1091 int res = 0, error = 0; |
1098 unsigned int error_size = sizeof(error); | 1092 socklen_t error_size = sizeof(error); |
1099 | 1093 |
1100 gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_CONNECTING\n"); | 1094 gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_CONNECTING\n"); |
1101 | 1095 |
1102 dcc->soft_timeout = 0; | 1096 dcc->soft_timeout = 0; |
1103 | 1097 |
1382 } | 1376 } |
1383 | 1377 |
1384 case GG_STATE_CONNECTING_RELAY: | 1378 case GG_STATE_CONNECTING_RELAY: |
1385 { | 1379 { |
1386 int res; | 1380 int res; |
1387 unsigned int res_size = sizeof(res); | 1381 socklen_t res_size = sizeof(res); |
1388 struct gg_dcc7_relay_req pkt; | 1382 struct gg_dcc7_relay_req pkt; |
1389 | 1383 |
1390 gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_CONNECTING_RELAY\n"); | 1384 gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_CONNECTING_RELAY\n"); |
1391 | 1385 |
1392 if (getsockopt(dcc->fd, SOL_SOCKET, SO_ERROR, &res, &res_size) != 0 || res != 0) { | 1386 if (getsockopt(dcc->fd, SOL_SOCKET, SO_ERROR, &res, &res_size) != 0 || res != 0) { |