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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 26 02:16:27 CDT 2008


Author: jdixon
Date: Tue Aug 26 02:16:26 2008
New Revision: 140018

URL: http://svn.digium.com/view/asterisk?view=rev&rev=140018
Log:
Fixed more in app_rpt for pseudo-chans

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

Modified: team/jdixon/chan_usbradio-1.4/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/apps/app_rpt.c?view=diff&rev=140018&r1=140017&r2=140018
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_rpt.c Tue Aug 26 02:16:26 2008
@@ -21,7 +21,7 @@
 /*! \file
  *
  * \brief Radio Repeater / Remote Base program 
- *  version 0.131 8/25/08 2055 EDT
+ *  version 0.132 8/26/08 2055 EDT
  * 
  * \author Jim Dixon, WB6NIL <jim at lambdatel.com>
  *
@@ -377,7 +377,7 @@
 /*! Stop the tones from playing */
 void ast_playtones_stop(struct ast_channel *chan);
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.131  8/25/2008";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.132  8/26/2008";
 
 static char *app = "Rpt";
 
@@ -10262,7 +10262,12 @@
 			    ((!strcmp(myrpt->remoterig, remote_rig_ft897) || 
 				!strcmp(myrpt->remoterig, remote_rig_ic706)) )) { 
 				myrpt->remotetx = 0;
-				ast_indicate(myrpt->txchannel,AST_CONTROL_RADIO_UNKEY);
+				if (strncasecmp(myrpt->txchannel->name,
+					"Zap/Pseudo",10))
+				{
+					ast_indicate(myrpt->txchannel,
+						AST_CONTROL_RADIO_UNKEY);
+				}	
 				myrpt->tunerequest = 1;
 				rpt_telemetry(myrpt,TUNE,NULL);
 				return DC_COMPLETEQUIET;
@@ -11699,7 +11704,11 @@
 			myrpt->dailykeyups++;
 			myrpt->totalkeyups++;
 			rpt_mutex_unlock(&myrpt->lock);
-			ast_indicate(myrpt->txchannel,AST_CONTROL_RADIO_KEY);
+			if (strncasecmp(myrpt->txchannel->name,"Zap/Pseudo",10))
+			{
+				ast_indicate(myrpt->txchannel,
+					AST_CONTROL_RADIO_KEY);
+			}
 			rpt_mutex_lock(&myrpt->lock);
 		}
 		if ((!totx) && lasttx)
@@ -11711,7 +11720,11 @@
 			myrpt->txkeyed = 0;
 			time(&myrpt->lasttxkeyedtime);
 			rpt_mutex_unlock(&myrpt->lock);
-			ast_indicate(myrpt->txchannel,AST_CONTROL_RADIO_UNKEY);
+			if (strncasecmp(myrpt->txchannel->name,"Zap/Pseudo",10))
+			{
+				ast_indicate(myrpt->txchannel,
+					AST_CONTROL_RADIO_UNKEY);
+			}
 			rpt_mutex_lock(&myrpt->lock);
 			donodelog(myrpt,"TXUNKEY,MAIN");
 		}
@@ -11897,10 +11910,14 @@
 					l->retxtimer = 0;
 					if (l->chan && l->phonemode == 0) 
 					{
-						if (l->lasttx)
+						if (strncasecmp(myrpt->txchannel->name,
+							"Zap/Pseudo",10))
+						{
+						    if (l->lasttx)
 							ast_indicate(l->chan,AST_CONTROL_RADIO_KEY);
-						else
+						    else
 							ast_indicate(l->chan,AST_CONTROL_RADIO_UNKEY);
+						}
 					}
 				}
 				if ((l->rerxtimer += elap) >= (REDUNDANT_TX_TIME * 5))
@@ -12568,13 +12585,18 @@
 					myrpt->exttx) || remrx) && l->mode;
 				if (l->phonemode == 0 && l->chan && (l->lasttx != totx))
 				{
-					if (totx)
+					if (strncasecmp(myrpt->txchannel->name,
+							"Zap/Pseudo",10))
 					{
+					    if (totx)
+					    {
 						ast_indicate(l->chan,AST_CONTROL_RADIO_KEY);
-					}
-					else
-					{
+					    }
+					    else
+					    {
 						ast_indicate(l->chan,AST_CONTROL_RADIO_UNKEY);
+					    }
+
 					}
 					if (myrpt->p.archivedir)
 					{
@@ -14455,7 +14477,6 @@
 					ast_log(LOG_NOTICE,"Handle rem_totx=%i.  dtmf_local_timer=%i  tunerequest=%i\n",rem_totx,myrpt->dtmf_local_timer,myrpt->tunerequest);
 
 				myrpt->remotetx = 1;
-				/* asdf maw ??? is this really what you want? Doesn't it always get executed? */
 				if((myrpt->remtxfreqok = check_tx_freq(myrpt)))
 				{
 					time(&myrpt->last_activity_time);




More information about the asterisk-commits mailing list