From b2bd38a4f0f603c632dec822f583c2eaa36945ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Evandro=20C=C3=A9sar=20Arruda?= <ecarruda@gmail.com>
Date: Fri, 21 Aug 2020 02:10:38 -0300
Subject: [PATCH] app_queue: Member lastpause time reseting

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 19622fd91a..ba206eb8dc 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3458,7 +3458,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,
-- 
GitLab