Fix meetme flushing stupidity (doh!) (bug #3599)
authorMark Spencer <markster@digium.com>
Sat, 5 Mar 2005 15:25:08 +0000 (15:25 +0000)
committerMark Spencer <markster@digium.com>
Sat, 5 Mar 2005 15:25:08 +0000 (15:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5148 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 269e6c5..ff70b5e 100755 (executable)
@@ -540,10 +540,8 @@ static void conf_flush(int fd)
 {
        int x;
        x = ZT_FLUSH_ALL;
-       if (ioctl(fd, ZT_FLUSH, x)) {
+       if (ioctl(fd, ZT_FLUSH, &x))
                ast_log(LOG_WARNING, "Error flushing channel\n");
-               close(fd);
-       }
 }
 
 static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int confflags)
@@ -795,7 +793,6 @@ zapretry:
                ast_mutex_unlock(&conflock);
                goto outrun;
        }
-       conf_flush(fd);
        ast_log(LOG_DEBUG, "Placed channel %s in ZAP conf %d\n", chan->name, conf->zapconf);
 
        manager_event(EVENT_FLAG_CALL, "MeetmeJoin", 
@@ -810,6 +807,7 @@ zapretry:
                if (!(confflags & CONFFLAG_QUIET))
                        conf_play(chan, conf, ENTER);
        }
+       conf_flush(fd);
        ast_mutex_unlock(&conflock);
        if (confflags & CONFFLAG_AGI) {