mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
app_queue.c: Fix clearing of pause reason string.
The pause reason is not always cleared when it should be cleared. * Made set_queue_member_pause() always clear pause reason if not pausing with a reason string. Change-Id: I993dad19626ec017478a230e980989438b778c53
This commit is contained in:
@@ -7232,12 +7232,12 @@ static void set_queue_member_pause(struct call_queue *q, struct member *mem, con
|
||||
|
||||
mem->paused = paused;
|
||||
if (paused) {
|
||||
if (!ast_strlen_zero(reason)) {
|
||||
ast_copy_string(mem->reason_paused, reason, sizeof(mem->reason_paused));
|
||||
}
|
||||
time(&mem->lastpause); /* update last pause field */
|
||||
}
|
||||
if (paused && !ast_strlen_zero(reason)) {
|
||||
ast_copy_string(mem->reason_paused, reason, sizeof(mem->reason_paused));
|
||||
} else {
|
||||
ast_copy_string(mem->reason_paused, "", sizeof(mem->reason_paused));
|
||||
mem->reason_paused[0] = '\0';
|
||||
}
|
||||
|
||||
ast_devstate_changed(mem->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,
|
||||
|
Reference in New Issue
Block a user