[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r195588 - /team/jpeeler/asteri...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 19 15:53:13 CDT 2009
Author: jpeeler
Date: Tue May 19 15:52:58 2009
New Revision: 195588
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=195588
Log:
Free and set to null cidspill when using sig_analog. Also, add locking to do_monitor such that when building the poll fd array to not erroneously set POLLIN on a channel that is being hung up.
Modified:
team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=195588&r1=195587&r2=195588
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Tue May 19 15:52:58 2009
@@ -5586,15 +5586,12 @@
default:
tone_zone_play_tone(p->subs[SUB_REAL].dfd, -1);
}
- if (p->cidspill)
- ast_free(p->cidspill);
if (p->sig)
dahdi_disable_ec(p);
x = 0;
ast_channel_setoption(ast,AST_OPTION_TONE_VERIFY,&x,sizeof(char),0);
ast_channel_setoption(ast,AST_OPTION_TDD,&x,sizeof(char),0);
p->didtdd = 0;
- p->cidspill = NULL;
p->callwaitcas = 0;
p->callwaiting = p->permcallwaiting;
p->hidecallerid = p->permhidecallerid;
@@ -5631,6 +5628,10 @@
p->oprmode = 0;
ast->tech_pvt = NULL;
hangup_out:
+ if (p->cidspill)
+ ast_free(p->cidspill);
+ p->cidspill = NULL;
+
ast_mutex_unlock(&p->lock);
ast_module_unref(ast_module_info->self);
ast_verb(3, "Hungup '%s'\n", ast->name);
@@ -10545,6 +10546,7 @@
count = 0;
i = iflist;
while (i) {
+ ast_mutex_lock(&i->lock);
if ((i->subs[SUB_REAL].dfd > -1) && i->sig && (!i->radio) && !(i->sig & SIG_MFCR2)) {
if (analog_lib_handles(i->sig, i->radio, i->oprmode)) {
struct analog_pvt *p = i->sig_pvt;
@@ -10562,8 +10564,6 @@
pfds[count].events |= POLLIN;
count++;
}
-
-
} else {
if (!i->owner && !i->subs[SUB_REAL].owner && !i->mwimonitoractive ) {
/* This needs to be watched, as it lacks an owner */
@@ -10578,6 +10578,7 @@
}
}
}
+ ast_mutex_unlock(&i->lock);
i = i->next;
}
/* Okay, now that we know what to do, release the interface lock */
More information about the asterisk-commits
mailing list