diff options
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 9f3dd1d77..b2e3c72b8 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -168,6 +168,10 @@ static int local_queue_frame(struct local_pvt *p, int isoutbound, struct ast_fra /* Recalculate outbound channel */ other = isoutbound ? p->owner : p->chan; + /* do not queue frame if generator is on both local channels */ + if (us && us->generator && other->generator) + return 0; + /* Set glare detection */ ast_set_flag(p, LOCAL_GLARE_DETECT); if (ast_test_flag(p, LOCAL_CANCEL_QUEUE)) { @@ -182,10 +186,6 @@ static int local_queue_frame(struct local_pvt *p, int isoutbound, struct ast_fra return 0; } - /* do not queue frame if generator is on both local channels */ - if (us && us->generator && other->generator) - return 0; - /* Ensure that we have both channels locked */ while (other && ast_channel_trylock(other)) { ast_mutex_unlock(&p->lock); |