diff options
Diffstat (limited to 'hicn-light/src/hicn/command_line/controller')
-rw-r--r-- | hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c b/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c index 8f56dc60a..31b9674ca 100644 --- a/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c +++ b/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c @@ -340,6 +340,9 @@ int main(int argc, char *argv[]) { mainState.controlState = controlState_Create(&mainState, _writeAndReadMessage, true, server_ip, server_port); + if (mainState.controlState == NULL) { + exit(EXIT_FAILURE); + } controlState_RegisterCommand(mainState.controlState, controlRoot_HelpCreate(mainState.controlState)); @@ -348,7 +351,9 @@ int main(int argc, char *argv[]) { if (parcList_Size(commands) > 0) { controlState_SetInteractiveFlag(mainState.controlState, false); - controlState_DispatchCommand(mainState.controlState, commands); + char output[8192]; + controlState_DispatchCommand(mainState.controlState, commands, output, sizeof(output)); + printf("%s", output); char **commandOutputMain = controlState_GetCommandOutput(mainState.controlState); if (commandOutputMain != NULL && commandOutputLen > 0) { |