]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix masquerading of local channels into the new channel type (bug #4529)
authorRussell Bryant <russell@russellbryant.com>
Tue, 26 Jul 2005 14:46:28 +0000 (14:46 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 26 Jul 2005 14:46:28 +0000 (14:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6222 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index 1637618cad2949dde6ffe0a98dc8ff62df18aa0d..bdf8101ec9f5946b2df41f8818e19d3b9224e15b 100755 (executable)
@@ -177,12 +177,17 @@ static int local_write(struct ast_channel *ast, struct ast_frame *f)
        int res = -1;
        int isoutbound;
 
-
        /* Just queue for delivery to the other side */
        ast_mutex_lock(&p->lock);
        isoutbound = IS_OUTBOUND(ast, p);
-       res = local_queue_frame(p, isoutbound, f, ast);
-       check_bridge(p, isoutbound);
+       if (f && (f->frametype == AST_FRAME_VOICE)) 
+               check_bridge(p, isoutbound);
+       if (!p->alreadymasqed)
+               res = local_queue_frame(p, isoutbound, f, ast);
+       else {
+               ast_log(LOG_DEBUG, "Not posting to queue since already masked on '%s'\n", ast->name);
+               res = 0;
+       }
        ast_mutex_unlock(&p->lock);
        return res;
 }