diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 7087b477c..db7069823 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -452,7 +452,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__, @@ -486,7 +488,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", @@ -526,7 +530,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 2c46eec2d..9c0ec0ee0 100644 --- a/lib/secure-streams/protocols/ss-mqtt.c +++ b/lib/secure-streams/protocols/ss-mqtt.c @@ -66,7 +66,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; @@ -86,9 +88,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 31516ddd9..76b11ea10 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 e2ffe2c44..39bdda1e8 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