Make vshDebug work when parsing parameters

The vshInit initializes ctl->debug by which vshDebug (which is also
called in vshParseArgv) decides whether to print out the message or
not.
This commit is contained in:
Martin Kletzander 2013-03-13 09:03:34 +01:00
parent cc78d7ba0e
commit abfff21006

View File

@ -3100,12 +3100,12 @@ main(int argc, char **argv)
ctl->name = vshStrdup(ctl, defaultConn); ctl->name = vshStrdup(ctl, defaultConn);
} }
if (!vshParseArgv(ctl, argc, argv)) { if (!vshInit(ctl)) {
vshDeinit(ctl); vshDeinit(ctl);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (!vshInit(ctl)) { if (!vshParseArgv(ctl, argc, argv)) {
vshDeinit(ctl); vshDeinit(ctl);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }