From 8f8aea56daf003597587cf5da57dfc6b63e117be Mon Sep 17 00:00:00 2001 From: Roman Janota Date: Wed, 26 Aug 2026 14:17:14 +0200 Subject: [PATCH] main UPDATE add err log on config fail Even though libnetconf2 will most likely log something when this call fails, netopeer2 should still at least log this simple error message, because config update failing leaves it in an almost unrecoverable state. --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 3e98889f..66a57325 100644 --- a/src/main.c +++ b/src/main.c @@ -1216,7 +1216,9 @@ np2srv_libnetconf2_config_cb(sr_session_ctx_t *session, uint32_t UNUSED(sub_id), diff = sr_get_change_diff(session); rc = nc_server_config_setup_diff(diff); if (rc) { - /* return value ignored anyway */ + /* return value ignored anyway, this is a "done" event and the change is already committed, + * so at least make it visible that the server configuration is now out of sync with it */ + ERR("Failed to apply the new server configuration, it is out of sync with the datastore."); return rc; }