Commit aa9339dc3de6a579571e49430245a5f36f2a27e4
1 parent
259bb7e3
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,10 +34,15 @@ httpMessageQueueGet(HttpMessageQueue this) | ||
34 | return NULL; | 34 | return NULL; |
35 | } | 35 | } |
36 | 36 | ||
37 | - msg = this->first->msg; | 37 | + msg = this->first->msg; |
38 | first = this->first->next; | 38 | first = this->first->next; |
39 | + | ||
40 | + if (this->first == this->last) { | ||
41 | + this->last = NULL; | ||
42 | + } | ||
39 | delete(this->first); | 43 | delete(this->first); |
40 | 44 | ||
45 | + this->next = first; | ||
41 | this->first = first; | 46 | this->first = first; |
42 | this->nmsg--; | 47 | this->nmsg--; |
43 | 48 |
Please
register
or
login
to post a comment