aboutsummaryrefslogtreecommitdiffstats
path: root/agni.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-11-25 11:31:56 +0000
committerFreeArtMan <dos21h@gmail.com>2017-11-25 11:31:56 +0000
commit32f380fb86012c5dbc856d3c81acfde13f2803e8 (patch)
treece1be167f5b152d9efcf660a32ea041e7b5f65b9 /agni.c
parent3967218650a2c03304533c4e8b32e86c8b38a48a (diff)
downloadagni-32f380fb86012c5dbc856d3c81acfde13f2803e8.tar.gz
agni-32f380fb86012c5dbc856d3c81acfde13f2803e8.zip
Hunting down all warnings
Diffstat (limited to 'agni.c')
-rw-r--r--agni.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/agni.c b/agni.c
index e4be388..ea1936e 100644
--- a/agni.c
+++ b/agni.c
@@ -330,12 +330,14 @@ int th_start_client(void *data)
printf("Cant get attribute\n");
ENL();
}
+
in_buf = malloc(in_attr.mq_msgsize);
memset(in_buf, 0, in_attr.mq_msgsize);
if (in_buf == NULL)
{
ENL();
}
+
//PRINT("SERVER:%s PORT:%s USER:%s\n", cfg->server, cfg->port, cfg->user);
//create irc parsing structures
@@ -383,7 +385,7 @@ int th_start_client(void *data)
if (mq_event == 1)
{
nb_init(nb_resp);
- nb_load(nb_resp, in_buf);
+ nb_load(nb_resp, (unsigned char *)in_buf);
rpc_resp_unmarsh(nb_resp, &resp);
PRINT("RESP: %d-%s(%s)\n", resp->id, resp->result, resp->error);
@@ -586,7 +588,7 @@ int th_start_client(void *data)
irciedent_parse(qcmd->ircident, req);
rpc_req_marsh(req, &nb_req);
- buf_nb = nb_create(nb_req);
+ buf_nb = (char *)nb_create(nb_req);
memcpy(out_buf, buf_nb, nb_req->size > out_attr.mq_msgsize ? out_attr.mq_msgsize : nb_req->size);
mq_ntf_write(mq, MQ_OUT, out_buf, out_attr.mq_msgsize);
FREE(buf_nb);
@@ -829,7 +831,7 @@ int th_event_manager(void *data)
if (mq_event == 1)
{
nb_init(nb_req);
- if (0 == nb_load(nb_req, out_buf))
+ if (0 == nb_load(nb_req, (unsigned char *)out_buf))
{
rpc_req_unmarsh(nb_req, &req);
PRINT("EVENT-REQ: %d-%s(%s) %s-%s-%s\n", req->id, req->method, req->params, req->user, req->mask, req->server);
@@ -867,7 +869,7 @@ int th_event_manager(void *data)
resp->server = alloc_new_str("");
rpc_resp_marsh(resp, &nb_resp);
- buf_nb = nb_create(nb_resp);
+ buf_nb = (char *)nb_create(nb_resp);
mq_ntf_write(mq_cur, MQ_IN, buf_nb, nb_resp->size > in_attr.mq_msgsize ? in_attr.mq_msgsize : nb_resp->size);
stats.cnt_ipc_tx += nb_resp->size > in_attr.mq_msgsize ? in_attr.mq_msgsize : nb_resp->size;
FREE(buf_nb);