Hello All
I have a enqueue function.
When I try to read the data in message struct using a head pointer, it can''t read the data. However, when I use the tail pointer, it works fine
Why???
Please help
Thanks
void timeout_enqueue(MSG_ENV *message)
{
if(timeout_q.head == NULL)
{
timeout_q.head = message;
timeout_q.tail = message;
}
else if(timeout_q.head != NULL)
{
timeout_q.tail->ptr = message;
timeout_q.tail = message;
}
}
That''s a whole lot of info..
If I had to make a hazard quess, you''re not initializing head->ptr but you''re initializing tail->ptr
If I had to make a hazard quess, you''re not initializing head->ptr but you''re initializing tail->ptr
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement