From 417edbce2abde566e94d8986b487293d55e173c0 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Thu, 4 May 2017 22:21:39 +0100 Subject: Added new commands CMD,SHA1. Added support of params for commands. Fixed some bugs with uninitialised buffers --- cmd_cmd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cmd_cmd.c (limited to 'cmd_cmd.c') diff --git a/cmd_cmd.c b/cmd_cmd.c new file mode 100644 index 0000000..d5983cf --- /dev/null +++ b/cmd_cmd.c @@ -0,0 +1,20 @@ +#include "cmd_cmd.h" + +void *cmd_cmd(void *data) +{ + char *ret = NULL; + int fret=-1; + + const int buf_size = 128; + char buf[buf_size+1]; + + printf("CMD\n"); + + snprintf(buf, buf_size, "%s", data); + + + + ret = alloc_new_str(buf); + + return ret; +} -- cgit v1.2.3