Add proper error message if namespace not found in module-set header

This commit is contained in:
Olof hagsand 2022-11-28 13:50:41 +01:00
parent 7a388b960a
commit 8ebab16c4c
4 changed files with 9 additions and 4 deletions

View file

@ -221,8 +221,11 @@ startup_common(clicon_handle h,
if (msdiff){
if ((ret = clixon_module_upgrade(h, xt, msdiff, cbret)) < 0)
goto done;
if (ret == 0)
if (ret == 0){
if (cbuf_len(cbret) == 0)
cprintf(cbret, "Module-set upgrade function returned failure but lacks reason (cbret is not set)");
goto fail;
}
}
/* Print upgraded db: -q backend switch for debugging/ showing upgraded config only */
if (clicon_quit_upgrade_get(h) == 1){