From: Andy Green Date: Thu, 25 Feb 2016 07:08:03 +0000 (+0800) Subject: test server log LWS_CALLBACK_HTTP X-Git-Tag: upstream/1.7.3~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=314ca966a0a17f2f67aff4a0d17252edb4f6797f;p=platform%2Fupstream%2Flibwebsockets.git test server log LWS_CALLBACK_HTTP Signed-off-by: Andy Green --- diff --git a/test-server/test-server-http.c b/test-server/test-server-http.c index 9cabce5..046f390 100644 --- a/test-server/test-server-http.c +++ b/test-server/test-server-http.c @@ -147,6 +147,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);