diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-10-12 17:27:06 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-10-13 15:56:53 -0500 |
commit | 9c54964dc5ba3585e24207693728bd254229ef59 (patch) | |
tree | b5cdbb735d6c57f6e17b1b572231370317baf003 /apps/app_queue.c | |
parent | dd6fc1bb7da290ccebdeff2a934a1824a7d8b099 (diff) |
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
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index a023b88ed..34c013142 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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, |