[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r196112 - /team/jpeeler/asteri...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 21 17:32:52 CDT 2009


Author: jpeeler
Date: Thu May 21 17:32:48 2009
New Revision: 196112

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=196112
Log:
oops, it should really be like this

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=196112&r1=196111&r2=196112
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Thu May 21 17:32:48 2009
@@ -9927,6 +9927,7 @@
 {
 	struct mwi_thread_data *mtd = data;
 	struct callerid_state *cs;
+	pthread_t threadid;
 	int samples = 0;
 	char *name, *number;
 	int flags;
@@ -9984,7 +9985,13 @@
 				mtd->pvt->ringt = mtd->pvt->ringt_base;
 
 				if ((chan = dahdi_new(mtd->pvt, AST_STATE_RING, 0, SUB_REAL, 0, 0))) {
-					if (analog_ss_thread_start(mtd->pvt->sig_pvt, chan)) {
+					int result;
+					if (analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
+						result = analog_ss_thread_start(mtd->pvt->sig_pvt, chan);
+					} else {
+						result = ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan);
+					}
+					if (result) {
 						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)




More information about the asterisk-commits mailing list