Commit a5d9699e53286ef47e8447932db2f428068d2554
1 parent
66e2ac5a
fix message queue get. Problem was not correctly updated last value on empty queue
Showing
1 changed file
with
6 additions
and
1 deletions
... | ... | @@ -34,10 +34,15 @@ httpMessageQueueGet(HttpMessageQueue this) |
34 | 34 | return NULL; |
35 | 35 | } |
36 | 36 | |
37 | - msg = this->first->msg; | |
37 | + msg = this->first->msg; | |
38 | 38 | first = this->first->next; |
39 | + | |
40 | + if (this->first == this->last) { | |
41 | + this->last = NULL; | |
42 | + } | |
39 | 43 | delete(this->first); |
40 | 44 | |
45 | + this->next = first; | |
41 | 46 | this->first = first; |
42 | 47 | this->nmsg--; |
43 | 48 | ... | ... |
Please
register
or
login
to post a comment