From: NeilBrown Date: Sun, 11 Oct 2015 08:09:34 +0000 (+1100) Subject: gsmd2: Fix bug in queue handling. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=9f187690a2be262c3e7131890997906d1fad29cc;p=plato.git gsmd2: Fix bug in queue handling. We need to treat the request queue as a queue, not a stack. Signed-off-by: NeilBrown --- 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)