Fix cli via ssh error log output issue
This commit is contained in:
parent
d358387d39
commit
9a6a378c99
1 changed files with 4 additions and 2 deletions
|
|
@ -584,11 +584,11 @@ clicon_parse(clicon_handle h,
|
||||||
}
|
}
|
||||||
if (csm != NULL){
|
if (csm != NULL){
|
||||||
if (cligen_ph_active_set_byname(ch, modename) < 0){
|
if (cligen_ph_active_set_byname(ch, modename) < 0){
|
||||||
fprintf(stderr, "No such parse-tree registered: %s\n", modename);
|
fprintf(f, "No such parse-tree registered: %s\n", modename);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if ((pt = cligen_pt_active_get(ch)) == NULL){
|
if ((pt = cligen_pt_active_get(ch)) == NULL){
|
||||||
fprintf(stderr, "No such parse-tree registered: %s\n", modename);
|
fprintf(f, "No such parse-tree registered: %s\n", modename);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (cliread_parse(ch, cmd, pt, &match_obj, &cvv, &callbacks, result, &reason) < 0)
|
if (cliread_parse(ch, cmd, pt, &match_obj, &cvv, &callbacks, result, &reason) < 0)
|
||||||
|
|
@ -633,6 +633,8 @@ clicon_parse(clicon_handle h,
|
||||||
}
|
}
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
|
fflush(f);
|
||||||
|
|
||||||
if (callbacks)
|
if (callbacks)
|
||||||
co_callbacks_free(&callbacks);
|
co_callbacks_free(&callbacks);
|
||||||
if (reason)
|
if (reason)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue