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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 28 15:55:34 CDT 2008


Author: jdixon
Date: Tue Oct 28 15:55:34 2008
New Revision: 152441

URL: http://svn.digium.com/view/asterisk?view=rev&rev=152441
Log:
hopefully more working now

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

Modified: team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c?view=diff&rev=152441&r1=152440&r2=152441
==============================================================================
--- team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c Tue Oct 28 15:55:34 2008
@@ -22,7 +22,7 @@
 /*! \file
  *
  * \brief Radio Repeater / Remote Base program 
- *  version 0.155 10/27/08 
+ *  version 0.156 10/28/08 
  * 
  * \author Jim Dixon, WB6NIL <jim at lambdatel.com>
  *
@@ -256,8 +256,8 @@
 
 #define	PARROTTIME 1000
 
-#define	TELEM_HANG_TIME 10000
-#define	LINK_HANG_TIME 10000
+#define	TELEM_HANG_TIME 120000
+#define	LINK_HANG_TIME 120000
 
 #define	DEFAULT_IOBASE 0x378
 
@@ -407,7 +407,7 @@
 /*! Stop the tones from playing */
 void ast_playtones_stop(struct ast_channel *chan);
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.155  10/27/2008";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.156  10/28/2008";
 
 static char *app = "Rpt";
 
@@ -1524,6 +1524,10 @@
 {
 	if (!myrpt) return(0);
 	if (!mylink) return(0);
+	/* if doesnt qual as a foreign link */
+	if ((mylink->name[0] != '0') && (!mylink->phonemode) &&
+	    strncasecmp(mylink->chan->name,"echolink",8) &&
+		strncasecmp(mylink->chan->name,"irlp",4)) return(0);
 	if (mylink->linkmode < 2) return(0);
 	if (mylink->linkmode == 0x7fffffff) return(1);
 	if (mylink->linkmode < 0x7ffffffe) return(1);
@@ -4190,8 +4194,6 @@
 unsigned int t1;
 struct	tm localtm;
 
-	ast_log(LOG_NOTICE,"foop: varcmd: %s\n",varcmd);
-
 	n = finddelim(varcmd,strs,100);
 	if (n < 1) return;
 	if (!strcasecmp(strs[0],"REMGO"))
@@ -5736,7 +5738,6 @@
 	{
 	    case VARCMD:
 		if (myrpt->telemmode < 2) return; 
-ast_log(LOG_NOTICE,"foop: allowing command %s\n",(char *)data);
 		break;
 	    case UNKEY:
 		/* if any of the following are defined, go ahead and do it,
@@ -7653,7 +7654,6 @@
 			ast_log(LOG_WARNING, "Unable to parse telem string %s\n",str);
 			return;
 		}
-ast_log(LOG_NOTICE,"foop: Got Tele string from node %s: %s\n",src,dest);
 		l = myrpt->links.next;
 		/* otherwise, send it to all of em */
 		while(l != &myrpt->links)
@@ -11978,7 +11978,7 @@
 		}
 		*tele++ = 0;
 		myrpt->txchannel = ast_request(tmpstr,AST_FORMAT_SLINEAR,tele,NULL);
-		if (!strcasecmp(tmpstr,"Zap"))
+		if ((!strcasecmp(tmpstr,"Zap")) && strcasecmp(tele,"pseudo"))
 			myrpt->zaptxchannel = myrpt->txchannel;
 		if (myrpt->txchannel)
 		{
@@ -12027,7 +12027,8 @@
 	else
 	{
 		myrpt->txchannel = myrpt->rxchannel;
-		if (!strncasecmp(myrpt->rxchanname,"Zap",3))
+		if ((!strncasecmp(myrpt->rxchanname,"Zap",3)) && 
+		    strcasecmp(myrpt->rxchanname,"Zap/pseudo"))
 			myrpt->zaptxchannel = myrpt->txchannel;
 	}
 	if (strncasecmp(myrpt->txchannel->name,"Zap/Pseudo",10))
@@ -13576,7 +13577,11 @@
 				    (!(myrpt->cmdnode[0] || 
 					(myrpt->dtmfidx > -1)));
 				totx = (((l->isremote) ? (remnomute) : 
+					myrpt->localtx || myrpt->callmode) || remrx) && l->mode;
+#if 0
+				totx = (((l->isremote) ? (remnomute) : 
 					myrpt->exttx) || remrx) && l->mode;
+#endif
 				/* foop */
 				if ((!l->lastrx) && altlink(myrpt,l)) totx = myrpt->txkeyed;
 				if (l->phonemode == 0 && l->chan && (l->lasttx != totx))
@@ -13589,7 +13594,6 @@
 					{
 						ast_indicate(l->chan,AST_CONTROL_RADIO_UNKEY);
 					}
-					printf("foop: key changed to %d\n",totx);
 					if (myrpt->p.archivedir)
 					{
 						char str[100];




More information about the asterisk-commits mailing list