[PATCH] gtp/queue/queue_seqdel(): fix element check which always was true

Alexander Couzens lynxis at fe80.eu
Tue May 31 12:42:38 UTC 2016


Iterate over all member until the correct member found, remove it
and rearrange the seqnext pointer
---
 gtp/queue.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gtp/queue.c b/gtp/queue.c
index 5b4d849..fbfa1ec 100644
--- a/gtp/queue.c
+++ b/gtp/queue.c
@@ -105,8 +105,7 @@ static int queue_seqdel(struct queue_t *queue, struct qmsg_t *qmsg)
 		printf("Begin queue_seqdel seq = %d\n", (int)qmsg->seq);
 
 	for (qmsg2 = queue->hashseq[hash]; qmsg2; qmsg2 = qmsg2->seqnext) {
-		/* FIXME: this is always true !?! */
-		if (qmsg == qmsg) {
+		if (qmsg == qmsg2) {
 			if (!qmsg_prev)
 				queue->hashseq[hash] = qmsg2->seqnext;
 			else
-- 
2.8.3



More information about the osmocom-net-gprs mailing list