mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
conmon: only build if WITH_CONMON
This commit is contained in:
parent
62b915c879
commit
9365490ef0
5 changed files with 20 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue