Skip to content

Commit 211c0e3

Browse files
maass-hamburgkartben
authored andcommitted
net: config: init: remove second init of syslog
Doing another init of the log_backend_net in the net config init could lead to the server, set during runtime, being overwritten by the Kconfig default. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1 parent b2248b9 commit 211c0e3

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

subsys/net/lib/config/init.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -553,17 +553,8 @@ int net_config_init_app(const struct device *dev, const char *app_info)
553553
/* This is activated late as it requires the network stack to be up
554554
* and running before syslog messages can be sent to network.
555555
*/
556-
if (IS_ENABLED(CONFIG_LOG_BACKEND_NET) &&
557-
IS_ENABLED(CONFIG_LOG_BACKEND_NET_AUTOSTART)) {
558-
const struct log_backend *backend = log_backend_net_get();
559-
560-
if (!log_backend_is_active(backend)) {
561-
if (backend->api->init != NULL) {
562-
backend->api->init(backend);
563-
}
564-
565-
log_backend_activate(backend, NULL);
566-
}
556+
if (IS_ENABLED(CONFIG_LOG_BACKEND_NET_AUTOSTART)) {
557+
log_backend_net_start();
567558
}
568559

569560
return ret;

0 commit comments

Comments
 (0)