projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d61bed3
)
test server log LWS_CALLBACK_HTTP
author
Andy Green
<andy.green@linaro.org>
Thu, 25 Feb 2016 07:06:37 +0000
(15:06 +0800)
committer
Andy Green
<andy.green@linaro.org>
Thu, 25 Feb 2016 07:06:37 +0000
(15:06 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-server-http.c
patch
|
blob
|
history
diff --git
a/test-server/test-server-http.c
b/test-server/test-server-http.c
index
c143343
..
b2f8817
100644
(file)
--- a/
test-server/test-server-http.c
+++ b/
test-server/test-server-http.c
@@
-146,6
+146,15
@@
int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user,
lwsl_notice("URI Arg %d: %s\n", ++n, buf);
}
}
+
+ {
+ char name[100], rip[50];
+ lws_get_peer_addresses(wsi, lws_get_socket_fd(wsi), name,
+ sizeof(name), rip, sizeof(rip));
+ sprintf(buf, "%s (%s)", name, rip);
+ lwsl_notice("HTTP connect from %s\n", buf);
+ }
+
if (len < 1) {
lws_return_http_status(wsi,
HTTP_STATUS_BAD_REQUEST, NULL);