Mercurial > pidgin
comparison libpurple/protocols/gg/lib/http.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | e2ff2ac0e022 |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
23 * | 23 * |
24 * \brief Obsługa połączeń HTTP | 24 * \brief Obsługa połączeń HTTP |
25 */ | 25 */ |
26 | 26 |
27 #include <sys/types.h> | 27 #include <sys/types.h> |
28 #ifndef _WIN32 | |
29 # include <sys/socket.h> | |
30 # include <netinet/in.h> | |
31 # include <arpa/inet.h> | |
32 #endif | |
33 | 28 |
34 #include "compat.h" | 29 #include "compat.h" |
35 #include "libgadu.h" | 30 #include "libgadu.h" |
36 #include "resolver.h" | 31 #include "resolver.h" |
37 | 32 |
38 #include <ctype.h> | 33 #include <ctype.h> |
39 #include <errno.h> | 34 #include <errno.h> |
40 #ifndef _WIN32 | |
41 # include <netdb.h> | |
42 #endif | |
43 #include <signal.h> | 35 #include <signal.h> |
44 #include <stdarg.h> | 36 #include <stdarg.h> |
45 #include <stdio.h> | 37 #include <stdio.h> |
46 #include <stdlib.h> | 38 #include <stdlib.h> |
47 #include <string.h> | 39 #include <string.h> |
256 | 248 |
257 h->state = GG_STATE_SENDING_QUERY; | 249 h->state = GG_STATE_SENDING_QUERY; |
258 } | 250 } |
259 | 251 |
260 if (h->state == GG_STATE_SENDING_QUERY) { | 252 if (h->state == GG_STATE_SENDING_QUERY) { |
261 size_t res; | 253 ssize_t res; |
262 | 254 |
263 if ((res = write(h->fd, h->query, strlen(h->query))) < 1) { | 255 if ((res = write(h->fd, h->query, strlen(h->query))) < 1) { |
264 gg_debug(GG_DEBUG_MISC, "=> http, write() failed (len=%d, res=%d, errno=%d)\n", strlen(h->query), res, errno); | 256 gg_debug(GG_DEBUG_MISC, "=> http, write() failed (len=%d, res=%d, errno=%d)\n", strlen(h->query), res, errno); |
265 gg_http_error(GG_ERROR_WRITING); | 257 gg_http_error(GG_ERROR_WRITING); |
266 } | 258 } |