diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 7f72aedf6..8f4b8d33b 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -419,7 +419,9 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, } assert(h->policy); +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif lws_metrics_caliper_report_hist(h->cal_txn, wsi); lwsl_info("%s: %s CLIENT_CONNECTION_ERROR: %s\n", __func__, @@ -453,7 +455,9 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, lws_sul_cancel(&h->sul_timeout); +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif lws_metrics_caliper_report_hist(h->cal_txn, wsi); //lwsl_notice("%s: %s LWS_CALLBACK_CLOSED_CLIENT_HTTP\n", @@ -493,7 +497,9 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, if (!h) return -1; +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif status = (int)lws_http_client_http_response(wsi); lwsl_info("%s: LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP: %d\n", __func__, status); diff --git a/lib/secure-streams/protocols/ss-mqtt.c b/lib/secure-streams/protocols/ss-mqtt.c index 92f8002a4..f8bf6d478 100644 --- a/lib/secure-streams/protocols/ss-mqtt.c +++ b/lib/secure-streams/protocols/ss-mqtt.c @@ -44,7 +44,9 @@ secstream_mqtt(struct lws *wsi, enum lws_callback_reasons reason, void *user, if (!h) break; +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif r = lws_ss_event_helper(h, LWSSSCS_UNREACHABLE); h->wsi = NULL; @@ -67,9 +69,9 @@ secstream_mqtt(struct lws *wsi, enum lws_callback_reasons reason, void *user, if (!h) break; lws_sul_cancel(&h->sul_timeout); - +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); - +#endif if (h->ss_dangling_connected) r = lws_ss_event_helper(h, LWSSSCS_DISCONNECTED); else diff --git a/lib/secure-streams/protocols/ss-raw.c b/lib/secure-streams/protocols/ss-raw.c index b11a74bcb..c6e8b7afb 100644 --- a/lib/secure-streams/protocols/ss-raw.c +++ b/lib/secure-streams/protocols/ss-raw.c @@ -48,7 +48,9 @@ secstream_raw(struct lws *wsi, enum lws_callback_reasons reason, void *user, lwsl_info("%s: %s, %s CLIENT_CONNECTION_ERROR: %s\n", __func__, lws_ss_tag(h), h->policy->streamtype, in ? (char *)in : "(null)"); +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif r = lws_ss_event_helper(h, LWSSSCS_UNREACHABLE); if (r == LWSSSSRET_DESTROY_ME) @@ -64,7 +66,9 @@ secstream_raw(struct lws *wsi, enum lws_callback_reasons reason, void *user, break; lws_sul_cancel(&h->sul_timeout); +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif lwsl_info("%s: %s, %s RAW_CLOSE\n", __func__, lws_ss_tag(h), h->policy ? h->policy->streamtype : "no policy"); diff --git a/lib/secure-streams/protocols/ss-ws.c b/lib/secure-streams/protocols/ss-ws.c index d7b04c093..db8879b20 100644 --- a/lib/secure-streams/protocols/ss-ws.c +++ b/lib/secure-streams/protocols/ss-ws.c @@ -46,7 +46,9 @@ secstream_ws(struct lws *wsi, enum lws_callback_reasons reason, void *user, if (!h) break; +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif r = lws_ss_event_helper(h, LWSSSCS_UNREACHABLE); if (r == LWSSSSRET_DESTROY_ME) @@ -64,7 +66,9 @@ secstream_ws(struct lws *wsi, enum lws_callback_reasons reason, void *user, break; lws_sul_cancel(&h->sul_timeout); +#if defined(LWS_WITH_CONMON) lws_conmon_ss_json(h); +#endif r = lws_ss_event_helper(h, LWSSSCS_DISCONNECTED); if (r == LWSSSSRET_DESTROY_ME) diff --git a/lib/secure-streams/secure-streams-process.c b/lib/secure-streams/secure-streams-process.c index eda1a5b52..d5822b69b 100644 --- a/lib/secure-streams/secure-streams-process.c +++ b/lib/secure-streams/secure-streams-process.c @@ -608,6 +608,7 @@ callback_ss_proxy(struct lws *wsi, enum lws_callback_reasons reason, * priority 2 */ +#if defined(LWS_WITH_CONMON) if (conn->ss->conmon_json) { unsigned int xlen = conn->ss->conmon_len; @@ -625,7 +626,7 @@ callback_ss_proxy(struct lws *wsi, enum lws_callback_reasons reason, pay = 0; goto again; } - +#endif /* * if no fresh rx metadata, just pass through incoming * dsh