[asterisk-commits] jpeeler: branch jpeeler/bug13173 r154964 - /team/jpeeler/bug13173/apps/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 5 18:39:08 CST 2008
Author: jpeeler
Date: Wed Nov 5 18:39:08 2008
New Revision: 154964
URL: http://svn.digium.com/view/asterisk?view=rev&rev=154964
Log:
Actually delete named recordings as expected.
Modified:
team/jpeeler/bug13173/apps/app_meetme.c
Modified: team/jpeeler/bug13173/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/bug13173/apps/app_meetme.c?view=diff&rev=154964&r1=154963&r2=154964
==============================================================================
--- team/jpeeler/bug13173/apps/app_meetme.c (original)
+++ team/jpeeler/bug13173/apps/app_meetme.c Wed Nov 5 18:39:08 2008
@@ -1284,9 +1284,9 @@
ast_softhangup(conf->chan, AST_SOFTHANGUP_EXPLICIT);
ast_cond_signal(&conf->announcelist_addition);
AST_LIST_UNLOCK(&conf->announcelist);
- //pthread_cancel(conf->announcethread);
pthread_join(conf->announcethread, NULL);
while ((item = AST_LIST_REMOVE_HEAD(&conf->announcelist, entry))) {
+ ast_filedelete(item->namerecloc, NULL);
ast_free(item);
}
AST_LIST_HEAD_DESTROY(&conf->announcelist);
@@ -1455,7 +1455,7 @@
struct announce_listitem *next, *current;
struct ast_conference *conf = data;
int res;
- char filename[40] = ""; /* jpeeler: don't know what amount should put here */
+ char filename[PATH_MAX] = "";
while (!conf->announcethread_stop) {
AST_LIST_LOCK(&conf->announcelist);
@@ -1482,7 +1482,12 @@
ast_waitstream(current->confchan, "");
}
}
- ast_filedelete(current->namerecloc, NULL);
+ if (current->announcetype == CONF_HASLEFT) {
+ ast_log(LOG_DEBUG, "jpeeler: deleting %s\n", current->namerecloc);
+ ast_filedelete(current->namerecloc, NULL);
+ } else {
+ ast_log(LOG_DEBUG, "jpeeler type= %d\n", current->announcetype);
+ }
}
next = AST_LIST_NEXT(current, entry);
AST_LIST_LOCK(&conf->announcelist);
@@ -2422,6 +2427,9 @@
AST_LIST_INSERT_TAIL(&conf->announcelist, item, entry);
ast_cond_signal(&conf->announcelist_addition);
AST_LIST_UNLOCK(&conf->announcelist);
+ } else if (conf->users == 1) {
+ /* Last person is leaving, so no reason to try and announce, but should delete the name recording */
+ ast_filedelete(user->namerecloc, NULL);
}
outrun:
More information about the asterisk-commits
mailing list