projects
/
libeap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WPS UPnP: Fix HTTP client timeout event code
[libeap.git]
/
src
/
wps
/
http_client.c
diff --git
a/src/wps/http_client.c
b/src/wps/http_client.c
index
fea2a04
..
92fe36f
100644
(file)
--- a/
src/wps/http_client.c
+++ b/
src/wps/http_client.c
@@
-21,7
+21,7
@@
#include "http_client.h"
#include "http_client.h"
-#define HTTP_CLIENT_TIMEOUT 30
+#define HTTP_CLIENT_TIMEOUT
_SEC
30
struct http_client {
struct http_client {
@@
-122,7
+122,7
@@
static void http_client_tx_ready(int sock, void *eloop_ctx, void *sock_ctx)
c->req = NULL;
c->hread = httpread_create(c->sd, http_client_got_response, c,
c->req = NULL;
c->hread = httpread_create(c->sd, http_client_got_response, c,
- c->max_response, HTTP_CLIENT_TIMEOUT);
+ c->max_response, HTTP_CLIENT_TIMEOUT
_SEC
);
if (c->hread == NULL) {
c->cb(c->cb_ctx, c, HTTP_CLIENT_FAILED);
return;
if (c->hread == NULL) {
c->cb(c->cb_ctx, c, HTTP_CLIENT_FAILED);
return;
@@
-181,8
+181,8
@@
struct http_client * http_client_addr(struct sockaddr_in *dst,
return NULL;
}
return NULL;
}
- if (eloop_register_timeout(HTTP_CLIENT_TIMEOUT
, 0, http_client_timeout
,
- c, NULL)) {
+ if (eloop_register_timeout(HTTP_CLIENT_TIMEOUT
_SEC, 0
,
+
http_client_timeout,
c, NULL)) {
http_client_free(c);
return NULL;
}
http_client_free(c);
return NULL;
}