summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-10-01 14:41:43 +0100
committerFreeArtMan <dos21h@gmail.com>2017-10-01 14:41:43 +0100
commitcd09b06adb30135f55909c02840c339422217d95 (patch)
treecdb3764ce7fe59df55c4fec68b4ab8dd667fec61 /cmd
parent512f057166af84c11fc7ed5e4768b9dd2fe9f590 (diff)
downloadagni-cd09b06adb30135f55909c02840c339422217d95.tar.gz
agni-cd09b06adb30135f55909c02840c339422217d95.zip
Fixed warnings all over the places
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cmd_stat.c9
-rw-r--r--cmd/cmd_todo.c16
2 files changed, 10 insertions, 15 deletions
diff --git a/cmd/cmd_stat.c b/cmd/cmd_stat.c
index 73b7fa6..dc2a097 100644
--- a/cmd/cmd_stat.c
+++ b/cmd/cmd_stat.c
@@ -5,7 +5,6 @@ void *cmd_stat(void *data)
char *param = (char *)data;
char *ret = NULL;
- int i;
int count;
sds params;
sds out_result;
@@ -25,16 +24,16 @@ void *cmd_stat(void *data)
out_result = sdscat(out_result,"+----------+----------+\n");
//cmd_success
- snprintf(buf,buf_size,"| CMD_SUCC | %08s |\n", tokens[0]);
+ snprintf(buf,buf_size,"| CMD_SUCC | %8s |\n", tokens[0]);
out_result = sdscat(out_result, buf);
//cmd_err
- snprintf(buf,buf_size,"| CMD_ERR | %08s |\n", tokens[1]);
+ snprintf(buf,buf_size,"| CMD_ERR | %8s |\n", tokens[1]);
out_result = sdscat(out_result, buf);
//ipc tx
- snprintf(buf,buf_size,"| IPC_TX | %08s |\n", tokens[2]);
+ snprintf(buf,buf_size,"| IPC_TX | %8s |\n", tokens[2]);
out_result = sdscat(out_result, buf);
//ipc rx
- snprintf(buf,buf_size,"| IPC_RX | %08s |\n", tokens[3]);
+ snprintf(buf,buf_size,"| IPC_RX | %8s |\n", tokens[3]);
out_result = sdscat(out_result, buf);
out_result = sdscat(out_result,"+----------+----------+");
diff --git a/cmd/cmd_todo.c b/cmd/cmd_todo.c
index e525d38..2b3993b 100644
--- a/cmd/cmd_todo.c
+++ b/cmd/cmd_todo.c
@@ -32,19 +32,18 @@ void *cmd_todo(void *data)
return NULL;
}
- PNL();
fret = rpc_call_req_unmarsh(nb_req, &req);
- PNL();
if (fret != 0)
{
ERROR("Invalid request format\n");
return NULL;
}
- PNL();
//----------------------------------------------------------------------------
//main code
+ PRINT("%s-%s-%s-%s-%s\n", req->method, req->params, req->user, req->mask, req->server);
+
//----------------------------------------------------------------------------
//prepare response
@@ -53,24 +52,21 @@ void *cmd_todo(void *data)
PNL();
resp = rpc_call_resp_new("Success","None",1);
- resp->user = alloc_new_str("");
- resp->server = alloc_new_str("");
- resp->mask = alloc_new_str("");
+ resp->user = alloc_new_str(" ");
+ resp->server = alloc_new_str(" ");
+ resp->mask = alloc_new_str(" ");
PNL();
rpc_call_resp_marsh(resp, &nb_resp);
PNL();
- nb_buf = nb_create(nb_resp);
+ nb_buf = (char *)nb_create(nb_resp);
if (nb_buf)
{
ret = nb_buf;
}
- PNL();
nb_free(nb_resp);
- PNL();
rpc_call_resp_free(resp);
- PNL();
return ret;
}