提交 3fc7dce7 编写于 作者: R Roger A. Light

Only register with DLT if DLT logging is enabled.

上级 67ac8cbe
...@@ -20,6 +20,7 @@ Broker: ...@@ -20,6 +20,7 @@ Broker:
if the owner/group is not the same as the user/group the broker is running if the owner/group is not the same as the user/group the broker is running
as. In future versions the broker will refuse to open these files. as. In future versions the broker will refuse to open these files.
- mosquitto_memcmp_const is now more constant time. - mosquitto_memcmp_const is now more constant time.
- Only register with DLT if DLT logging is enabled.
Client library: Client library:
- Use CLOCK_BOOTTIME when available, to keep track of time. This solves the - Use CLOCK_BOOTTIME when available, to keep track of time. This solves the
......
...@@ -134,10 +134,12 @@ int log__init(struct mosquitto__config *config) ...@@ -134,10 +134,12 @@ int log__init(struct mosquitto__config *config)
setlinebuf(stdout); setlinebuf(stdout);
} }
#ifdef WITH_DLT #ifdef WITH_DLT
dlt_fifo_check(); if(log_destinations & MQTT3_LOG_DLT){
if(dlt_allowed){ dlt_fifo_check();
DLT_REGISTER_APP("MQTT","mosquitto log"); if(dlt_allowed){
dlt_register_context(&dltContext, "MQTT", "mosquitto DLT context"); DLT_REGISTER_APP("MQTT","mosquitto log");
dlt_register_context(&dltContext, "MQTT", "mosquitto DLT context");
}
} }
#endif #endif
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册