Fix return code of ddcfg api