aboutsummaryrefslogtreecommitdiffstats
path: root/tbl_qcmd.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-09-05 19:56:33 +0100
committerFreeArtMan <dos21h@gmail.com>2017-09-05 19:56:33 +0100
commit7b529a3875d2987b62e5fb5349fdfba36a59a7c3 (patch)
treeef87aae5273d82c8e7922fbb8ec102e90dc66b24 /tbl_qcmd.c
parenta910bc4131984ca5a1e0860dc89073586197a4ba (diff)
downloadagni-7b529a3875d2987b62e5fb5349fdfba36a59a7c3.tar.gz
agni-7b529a3875d2987b62e5fb5349fdfba36a59a7c3.zip
server->event thread messaging, command execution and response.
Diffstat (limited to 'tbl_qcmd.c')
-rw-r--r--tbl_qcmd.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/tbl_qcmd.c b/tbl_qcmd.c
index c41f6ec..d3e0d7f 100644
--- a/tbl_qcmd.c
+++ b/tbl_qcmd.c
@@ -591,6 +591,7 @@ tble_cmd_param* tbl_cmd_param(tble_qcmd *cmd)
ret->id = uniq_id();
ret->qid = cmd->id;
+ ret->ircident = alloc_new_str(cmd->ircident);
ret->cmd = alloc_new_str(cmd->cmd);
ret->param = alloc_new_str(cmd->param);
ret->out_q = cmd->out_q;
@@ -606,6 +607,8 @@ int tbl_cmd_param_free(tble_cmd_param *param)
}
PNL();
+ free(param->ircident);
+ PNL();
free(param->cmd);
PNL();
free(param->param);
@@ -621,11 +624,12 @@ int tbl_cmd_param_print(tble_cmd_param *param)
return -1;
printf("PARAM ");
- printf("ID:[%d] ", param->id);
- printf("QID:[%d] ", param->qid);
- printf("OUT_Q:[%d] ", param->out_q);
- printf("CMD:[%s] ", param->cmd);
- printf("PARAM:[%s] ", param->param);
+ printf("ID:[%d] ", param->id);
+ printf("QID:[%d] ", param->qid);
+ printf("OUT_Q:[%d] ", param->out_q);
+ printf("IRCIDENT:[%s] ", param->ircident);
+ printf("CMD:[%s] ", param->cmd);
+ printf("PARAM:[%s] ", param->param);
printf("\n");
return 0;
@@ -711,6 +715,10 @@ int tbl_qcmd_print_cmd(tble_qcmd *tbl, int flags)
{
printf("TIMEOUT:[%d] ", tbl->timeout);
}
+ if (flags&TBL_PF_QCMD_IRCIDENT)
+ {
+ printf("IRCIDENT:[%s] ", tbl->ircident);
+ }
if (flags&TBL_PF_QCMD_CMD)
{
printf("CMD:[%s] ", tbl->cmd);
@@ -778,6 +786,8 @@ int tbl_qcmd_destroy_cmd(tble_qcmd *tble)
//?
//Free token list TODO
+ free(tble->ircident);
+ tble->ircident = NULL;
free(tble->cmd);
tble->cmd = NULL;