TAILQ_REMOVE() the netbuf before adding it to the HEAD of recv_queue again.

This commit is contained in:
Joris Vink 2013-07-12 15:49:49 +02:00
parent 2e3720abc9
commit 0fee1247c9
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ net_recv_expand(struct connection *c, struct netbuf *nb, size_t len,
nb->cb = cb;
nb->len += len;
nb->buf = (u_int8_t *)kore_realloc(nb->buf, nb->len);
TAILQ_REMOVE(&(c->recv_queue), nb, list);
TAILQ_INSERT_HEAD(&(c->recv_queue), nb, list);
return (KORE_RESULT_OK);