Some small tweaks regarding realtime conference announcements.
authorMark Michelson <mmichelson@digium.com>
Wed, 8 Oct 2008 22:32:37 +0000 (22:32 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 8 Oct 2008 22:32:37 +0000 (22:32 +0000)
(closes issue #13522)
Reported by: DEA
Patches:
      meetme-rt-fixes.txt uploaded by DEA (license 3)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147714 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 68c8617..6a832e7 100644 (file)
@@ -2172,16 +2172,16 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
                                                        extended = 1;
                                                }
 
-                                               if (conf->endtime && (now.tv_sec > conf->endtime)) {
+                                               if (conf->endtime && (now.tv_sec >= conf->endtime)) {
                                                        ast_verbose("Quitting time...\n");
                                                        goto outrun;
                                                }
 
                                                if (!announcement_played && conf->endalert) {
-                                                       if (now.tv_sec + conf->endalert > conf->endtime) {
+                                                       if (now.tv_sec + conf->endalert >= conf->endtime) {
                                                                if (!ast_streamfile(chan, "conf-will-end-in", chan->language))
                                                                        ast_waitstream(chan, "");
-                                                               ast_say_digits(chan, (now.tv_sec + conf->endalert - conf->endtime) / 60, "", chan->language);
+                                                               ast_say_digits(chan, (conf->endtime - now.tv_sec) / 60, "", chan->language);
                                                                if (!ast_streamfile(chan, "minutes", chan->language))
                                                                        ast_waitstream(chan, "");
                                                                announcement_played = 1;