From 9f187690a2be262c3e7131890997906d1fad29cc Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 11 Oct 2015 19:09:34 +1100 Subject: [PATCH] gsmd2: Fix bug in queue handling. We need to treat the request queue as a queue, not a stack. Signed-off-by: NeilBrown --- gsm/gsmd2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsm/gsmd2.py b/gsm/gsmd2.py index 75dbb28..6ca4c28 100644 --- a/gsm/gsmd2.py +++ b/gsm/gsmd2.py @@ -496,7 +496,7 @@ class modem(Engine,AtChannel): return if self.suspended: return - cmd, cb, timeout = self.queue.pop() + cmd, cb, timeout = self.queue.pop(0) if not cb: cb = self.ignore self.pending_command = cb @@ -515,7 +515,7 @@ class modem(Engine,AtChannel): def clear_queue(self): while self.queue: - cmd, cb, timeout = self.queue.pop() + cmd, cb, timeout = self.queue.pop(0) if cb: cb(None) -- 2.39.5