]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue: Member lastpause time reseting
authorEvandro César Arruda <ecarruda@gmail.com>
Fri, 21 Aug 2020 04:51:42 +0000 (01:51 -0300)
committerKevin Harwell <kharwell@digium.com>
Tue, 25 Aug 2020 23:27:54 +0000 (18:27 -0500)
This fixes the reseting members lastpause problem when realtime members is being used,
the function rt_handle_member_record was forcing the reset members lastpause because it
does not exist in realtime

ASTERISK-29034 #close

Change-Id: Ic9107e4456732a1f78412a32adb2ef87f5da40b5

apps/app_queue.c

index b6d857be0cd707d7a1012b5d4a56a8d563b765b2..b13dc781318f6d04cdb0beb9ab18efa1356e5c27 100644 (file)
@@ -3461,7 +3461,7 @@ static void rt_handle_member_record(struct call_queue *q, char *category, struct
                        ast_copy_string(m->rt_uniqueid, rt_uniqueid, sizeof(m->rt_uniqueid));
                        if (paused_str) {
                                m->paused = paused;
-                               if (paused) {
+                               if (paused && m->lastpause == 0) {
                                        time(&m->lastpause); /* XXX: Should this come from realtime? */
                                }
                                ast_devstate_changed(m->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,