diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-10-14 09:07:22 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-10-14 09:07:22 -0500 |
commit | 1b9ef66c50fb565ae0e2dff5f9e65f5d169b3b59 (patch) | |
tree | 15dfcf2daaaeebcd3a7794ec2fe98e2a76b4a4dc /apps | |
parent | ee4ae2b648b3d3868ab341e9c1366fc8034b4252 (diff) | |
parent | bcac905bd3d73c03f31dd67d9fb0199b510f77f0 (diff) |
Merge "app_queue.c: Fix clearing of pause reason string." into 13
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 45b5683ed..79a19c8f6 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -7199,12 +7199,10 @@ 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)); - } + 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, |