[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r150383 - /team/jdixon/chan_usbradio-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 16 22:00:54 CDT 2008


Author: jdixon
Date: Thu Oct 16 22:00:53 2008
New Revision: 150383

URL: http://svn.digium.com/view/asterisk?view=rev&rev=150383
Log:
Checked (and fixed) echolink, irlp, normal linking, autopatch and
various vox modes.

Modified:
    team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c

Modified: team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c?view=diff&rev=150383&r1=150382&r2=150383
==============================================================================
--- team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/dev-1.0/apps/app_rpt.c Thu Oct 16 22:00:53 2008
@@ -1404,7 +1404,7 @@
 					if (l == talker)
 						rpt_vars[n].fraw = lf->fraw;
 					else
-						ast_frfree(lf->fraw);
+						if (lf->fraw) ast_frfree(lf->fraw);
 					free(lf);
 				}
 			}
@@ -1573,7 +1573,9 @@
 				}
 				if ((!rpt_vars[n].keyed) && (rpt_vars[n].ntalkers < 1)) doraw = 0;
 				if (rpt_vars[n].fraw == NULL) doraw = 0;
-				if (rpt_vars[n].talker && (rpt_vars[n].talker != TALKER_MAIN) &&
+				if (rpt_vars[n].talker && rpt_vars[n].txchannel && 
+				 (rpt_vars[n].talker != TALKER_MAIN) &&
+				   rpt_vars[n].talker->chan &&
 				    (rpt_vars[n].txchannel->writeformat !=
 					rpt_vars[n].talker->chan->readformat)) doraw = 0;
 
@@ -6509,9 +6511,6 @@
 	}
 	if (l->chan->_state == AST_STATE_UP)
 	{
-printf("foop: Chan %s, raw: %d %d, reg: %d %d\n",
-	l->chan->name,l->chan->rawreadformat,l->chan->rawwriteformat,
-		l->chan->readformat,l->chan->writeformat);
 		ast_set_read_format(l->chan,l->chan->rawreadformat);
 		ast_set_write_format(l->chan,l->chan->rawwriteformat);
 		l->read_path = ast_translator_build_path(AST_FORMAT_SLINEAR,
@@ -13252,8 +13251,8 @@
 								break;
 							}
 							memset(lf,0,sizeof(struct rpt_linkrx));
-							lf->flin = ast_frdup(f1);
-							lf->fraw = f1;
+							lf->fraw = NULL;
+							lf->flin = f1;
 							AST_LIST_INSERT_TAIL(&l->linq,lf,linkrx_list);
 							rpt_mutex_unlock(&myrpt->lock);
 						}
@@ -13272,7 +13271,7 @@
 								break;
 							}
 							memset(lf,0,sizeof(struct rpt_linkrx));
-							lf->fraw = ast_frdup(f);
+							if (f->subclass != AST_FORMAT_SLINEAR) lf->fraw = ast_frdup(f);
 							f1 = ast_frdup(f);
 							f2 = rpt_translate(l->read_path,f1,1);
 							lf->flin = ast_frdup(f2);
@@ -13336,9 +13335,6 @@
 						{
 							l->reconnects++;
 						}
-printf("foop: Chan %s, raw: %d %d, reg: %d %d\n",
-	l->chan->name,l->chan->rawreadformat,l->chan->rawwriteformat,
-		l->chan->readformat,l->chan->writeformat);
 						ast_set_read_format(l->chan,l->chan->rawreadformat);
 						ast_set_write_format(l->chan,l->chan->rawwriteformat);
 						l->read_path = ast_translator_build_path(AST_FORMAT_SLINEAR,
@@ -13942,6 +13938,9 @@
 	{
 		int val;
 
+		ast_set_read_format(chan,AST_FORMAT_SLINEAR);
+		ast_set_write_format(chan,AST_FORMAT_SLINEAR);
+
 		pbx_builtin_setvar_helper(chan, "RPT_STAT_BUSY", "0");
 
 		myrpt->bargechan=0;
@@ -14324,8 +14323,6 @@
 		AST_LIST_HEAD_INIT_NOLOCK(&l->rxq);
 		rpt_mutex_lock(&myrpt->lock);
 
-printf("foop: %d %d, %d %d\n",l->chan->rawreadformat,l->chan->rawwriteformat,
-	l->chan->readformat,l->chan->writeformat);
 		ast_set_read_format(l->chan,l->chan->readformat);
 		ast_set_write_format(l->chan,l->chan->writeformat);
 		l->read_path = ast_translator_build_path(AST_FORMAT_SLINEAR,




More information about the asterisk-commits mailing list