diff --git a/src/fast_task_queue.h b/src/fast_task_queue.h index 06a873e..785e656 100644 --- a/src/fast_task_queue.h +++ b/src/fast_task_queue.h @@ -47,7 +47,7 @@ struct nio_thread_data struct fast_task_info { - IOEventEntry event; + IOEventEntry event; //must first char client_ip[IP_ADDRESS_SIZE]; void *arg; //extra argument pointer char *data; //buffer for write or recv diff --git a/src/ioevent_loop.c b/src/ioevent_loop.c index 11b0755..f09411b 100644 --- a/src/ioevent_loop.c +++ b/src/ioevent_loop.c @@ -19,20 +19,20 @@ static void deal_ioevents(IOEventPoller *ioevent, const int count) static void deal_timeouts(FastTimerEntry *head) { FastTimerEntry *entry; - FastTimerEntry *curent; + FastTimerEntry *current; IOEventEntry *pEventEntry; entry = head->next; while (entry != NULL) { - curent = entry; + current = entry; entry = entry->next; - pEventEntry = (IOEventEntry *)curent->data; + pEventEntry = (IOEventEntry *)current->data; if (pEventEntry != NULL) { pEventEntry->callback(pEventEntry->fd, IOEVENT_TIMEOUT, - curent->data); + current->data); } } }