Skip to content

Commit

Permalink
Update xkcp_util.c
Browse files Browse the repository at this point in the history
  • Loading branch information
liudf0716 authored Apr 25, 2017
1 parent 9505e4c commit bdc5cbb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xkcp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,19 @@ static void dump_task(struct xkcp_task *task, struct bufferevent *bev, int index
ikcp_peeksize(task->kcp), task->kcp->stream);
}

int get_task_list_size(iqueue_head *task_list)
{
struct xkcp_task *task;
int num = 0;
iqueue_foreach(task, task_list, xkcp_task_type, head) {
if (task->kcp) {
num++;
}
}

return num;
}

void dump_task_list(iqueue_head *task_list, struct bufferevent *bev) {
struct xkcp_task *task;
task_list_count = 0;
Expand Down

0 comments on commit bdc5cbb

Please sign in to comment.