aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/config/commandParser.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/config/commandParser.c')
-rw-r--r--hicn-light/src/hicn/config/commandParser.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hicn-light/src/hicn/config/commandParser.c b/hicn-light/src/hicn/config/commandParser.c
index fa3269c9a..f4652fe39 100644
--- a/hicn-light/src/hicn/config/commandParser.c
+++ b/hicn-light/src/hicn/config/commandParser.c
@@ -201,14 +201,17 @@ static CommandOps *commandParser_MatchCommand(CommandParser *state,
}
CommandReturn commandParser_DispatchCommand(CommandParser *state,
- PARCList *args) {
+ PARCList *args,
+ char *output,
+ size_t output_size) {
+ parcAssertNotNull(output, "output buffer is null\n");
CommandOps *ops = commandParser_MatchCommand(state, args);
if (ops == NULL) {
- printf("Command not found.\n");
+ snprintf(output, output_size, "Command not found.\n");
return CommandReturn_Failure;
} else {
- return ops->execute(state, ops, args);
+ return ops->execute(state, ops, args, output, output_size);
}
}