summaryrefslogtreecommitdiff
path: root/tbl_qcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tbl_qcmd.c')
-rw-r--r--tbl_qcmd.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/tbl_qcmd.c b/tbl_qcmd.c
index 6d7360d..e7d74ac 100644
--- a/tbl_qcmd.c
+++ b/tbl_qcmd.c
@@ -334,6 +334,26 @@ int tbl_qcmd_del(tbl_qcmd *tbl, int idx)
return ret;
}
+int tbl_qcmd_add_tok(tble_qcmd *tbl, irc_token *tk)
+{
+ if (tbl == NULL)
+ {
+ PERM();
+ return -1;
+ }
+
+ if (tk == NULL)
+ {
+ PERM();
+ return -1;
+ }
+
+ //just copy inside new token
+ tbl->tok = token_cpy_new(tk);
+
+ return 0;
+}
+
int tbl_qcmd_resp(tbl_qcmd *tbl, tble_cmd_resp *resp)
{
int ret = -1;
@@ -349,7 +369,9 @@ int tbl_qcmd_resp(tbl_qcmd *tbl, tble_cmd_resp *resp)
for (i=0;i<tbl->size;i++)
{
single_cmd = tbl->cmd[i];
- if ((single_cmd->id == resp->id))
+
+ //check this for particular checks
+ if ((single_cmd->cid == resp->qid))
{
return i;
}
@@ -558,6 +580,9 @@ int tbl_qcmd_destroy_cmd(tble_qcmd *tble)
return -1;
}
+ //?
+ //Free token list TODO
+
free(tble->cmd);
tble->cmd = NULL;