diff options
Diffstat (limited to 'hicn-light/src/hicn/config/controlMapMeRetx.c')
-rw-r--r-- | hicn-light/src/hicn/config/controlMapMeRetx.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/hicn-light/src/hicn/config/controlMapMeRetx.c b/hicn-light/src/hicn/config/controlMapMeRetx.c index 49e5b419d..9f37ca6f5 100644 --- a/hicn-light/src/hicn/config/controlMapMeRetx.c +++ b/hicn-light/src/hicn/config/controlMapMeRetx.c @@ -28,10 +28,15 @@ #include <hicn/utils/utils.h> static CommandReturn _controlMapMeRetx_Execute(CommandParser *parser, - CommandOps *ops, PARCList *args); + CommandOps *ops, + PARCList *args, + char *output, + size_t output_size); static CommandReturn _controlMapMeRetx_HelpExecute(CommandParser *parser, CommandOps *ops, - PARCList *args); + PARCList *args, + char *output, + size_t output_size); static const char *_commandMapMeRetx = "mapme retx"; static const char *_commandMapMeRetxHelp = "help mapme retx"; @@ -52,24 +57,27 @@ CommandOps *controlMapMeRetx_HelpCreate(ControlState *state) { static CommandReturn _controlMapMeRetx_HelpExecute(CommandParser *parser, CommandOps *ops, - PARCList *args) { - printf("mapme retx <milliseconds>n"); - printf("\n"); + PARCList *args, + char *output, + size_t output_size) { + snprintf(output, output_size, "mapme retx <milliseconds>\n\n"); return CommandReturn_Success; } static CommandReturn _controlMapMeRetx_Execute(CommandParser *parser, CommandOps *ops, - PARCList *args) { + PARCList *args, + char *output, + size_t output_size) { if (parcList_Size(args) != 3) { - _controlMapMeRetx_HelpExecute(parser, ops, args); + _controlMapMeRetx_HelpExecute(parser, ops, args, output, output_size); return CommandReturn_Failure; } const char *rtx = parcList_GetAtIndex(args, 2); if (!utils_IsNumber(rtx)) { - printf( + snprintf(output, output_size, "ERROR: retransmission value (expressed in ms) must be a positive " "integer \n"); return CommandReturn_Failure; |