From 9ad08ec9c14f67f0a41cce6796ae5a4ad160a440 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@warmcat.com>
Date: Sat, 25 Aug 2018 05:43:31 +0800
Subject: [PATCH] LWS_WITH_STATS: clean refactor dust

https://github.com/warmcat/libwebsockets/issues/1383
---
 lib/core/libwebsockets.c | 5 +++--
 lib/tls/openssl/ssl.c    | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/core/libwebsockets.c b/lib/core/libwebsockets.c
index 351db79a..4cd86c9a 100644
--- a/lib/core/libwebsockets.c
+++ b/lib/core/libwebsockets.c
@@ -3507,7 +3507,7 @@ lws_stats_log_dump(struct lws_context *context)
 		wl = pt->http.ah_wait_list;
 		while (wl) {
 			m++;
-			wl = wl->ah_wait_list;
+			wl = wl->http.ah_wait_list;
 		}
 
 		lwsl_notice("  AH wait list count / actual:      %d / %d\n",
@@ -3544,7 +3544,8 @@ lws_stats_log_dump(struct lws_context *context)
 					strcpy(buf, "unknown");
 #if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
 				lwsl_notice("  peer %s: count wsi: %d, count ah: %d\n",
-					    buf, df->count_wsi, df->count_ah);
+					    buf, df->count_wsi,
+					    df->http.count_ah);
 #else
 				lwsl_notice("  peer %s: count wsi: %d\n",
 					    buf, df->count_wsi);
diff --git a/lib/tls/openssl/ssl.c b/lib/tls/openssl/ssl.c
index 5fc86ef7..eb55b093 100644
--- a/lib/tls/openssl/ssl.c
+++ b/lib/tls/openssl/ssl.c
@@ -331,7 +331,7 @@ lws_ssl_capable_write(struct lws *wsi, unsigned char *buf, int len)
 		if (m == SSL_ERROR_WANT_WRITE || SSL_want_write(wsi->tls.ssl)) {
 			lws_set_blocking_send(wsi);
 
-			lwsl_notice("%s: want write\n", __func__);
+			lwsl_debug("%s: want write\n", __func__);
 
 			return LWS_SSL_CAPABLE_MORE_SERVICE;
 		}
-- 
GitLab