[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r196111 - /team/jpeeler/asteri...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 21 17:19:05 CDT 2009
Author: jpeeler
Date: Thu May 21 17:19:01 2009
New Revision: 196111
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=196111
Log:
don't launch the old ss_thread from the mwi_thread
Modified:
team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h
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=196111&r1=196110&r2=196111
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Thu May 21 17:19:01 2009
@@ -2298,7 +2298,7 @@
}
-static char *event2str(int event);
+static const char *event2str(int event);
static struct analog_callback dahdi_analog_callbacks =
{
@@ -9927,7 +9927,6 @@
{
struct mwi_thread_data *mtd = data;
struct callerid_state *cs;
- pthread_t threadid;
int samples = 0;
char *name, *number;
int flags;
@@ -9985,7 +9984,7 @@
mtd->pvt->ringt = mtd->pvt->ringt_base;
if ((chan = dahdi_new(mtd->pvt, AST_STATE_RING, 0, SUB_REAL, 0, 0))) {
- if (ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan)) {
+ if (analog_ss_thread_start(mtd->pvt->sig_pvt, chan)) {
ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", mtd->pvt->channel);
res = tone_zone_play_tone(mtd->pvt->subs[SUB_REAL].dfd, DAHDI_TONE_CONGESTION);
if (res < 0)
@@ -10554,7 +10553,7 @@
if (!p)
ast_log(LOG_ERROR, "No sig_pvt?\n");
- if (!p->owner && !p->subs[ANALOG_SUB_REAL].owner) {
+ if (!p->owner && !p->subs[SUB_REAL].owner) {
/* This needs to be watched, as it lacks an owner */
pfds[count].fd = i->subs[SUB_REAL].dfd;
pfds[count].events = POLLPRI;
@@ -10564,7 +10563,7 @@
pfds[count].events |= POLLIN;
count++;
}
- } else {
+ } else {
if (!i->owner && !i->subs[SUB_REAL].owner && !i->mwimonitoractive ) {
/* This needs to be watched, as it lacks an owner */
pfds[count].fd = i->subs[SUB_REAL].dfd;
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c?view=diff&rev=196111&r1=196110&r2=196111
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c Thu May 21 17:19:01 2009
@@ -2153,6 +2153,12 @@
ast_log(LOG_WARNING, "Unable to play congestion tone on channel %d\n", p->channel);
ast_hangup(chan);
return NULL;
+}
+
+int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *chan)
+{
+ pthread_t threadid;
+ return ast_pthread_create_detached(&threadid, NULL, __analog_ss_thread, chan);
}
static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_channel *ast)
Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h?view=diff&rev=196111&r1=196110&r2=196111
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h Thu May 21 17:19:01 2009
@@ -302,4 +302,6 @@
const char *analog_cidtype_to_str(unsigned int cid_type);
+int analog_ss_thread_start(struct analog_pvt *p, struct ast_channel *ast);
+
#endif /* _SIG_ANSLOG_H */
More information about the asterisk-commits
mailing list