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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 17 03:15:31 CST 2008


Author: jdixon
Date: Mon Nov 17 03:15:31 2008
New Revision: 157239

URL: http://svn.digium.com/view/asterisk?view=rev&rev=157239
Log:
Appears to properly support full duplex now

Modified:
    team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c

Modified: team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c?view=diff&rev=157239&r1=157238&r2=157239
==============================================================================
--- team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c (original)
+++ team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c Mon Nov 17 03:15:31 2008
@@ -34,7 +34,7 @@
 #define	rpt_free(p) __ast_free(p,__FILE__,__LINE__,__PRETTY_FUNCTION__)
 
 
-/* Version 0.15, 11/16/2008
+/* Version 0.16, 11/17/2008
 irlp channel driver for Asterisk/app_rpt.
 
 I wish to thank the following people for the immeasurable amount of
@@ -634,30 +634,31 @@
 	  cp = irlp_read_file(IRLP_ROOT,"codec");
 	  if (cp) 
 	  {
+		  if (cp[strlen(cp) - 1] == '\n') cp[strlen(cp) - 1] = 0;
 		  if (!strncasecmp(cp,"GSM",3))
 		  {
 			  if (proto == IRLP_NOPROTO)
-				  ast_log(LOG_NOTICE,"irlp channel format set to GSM\n");
+				  ast_log(LOG_NOTICE,"irlp channel format set to %s\n",cp);
 			  else if (proto != IRLP_ISGSM)
-				  ast_log(LOG_NOTICE,"irlp channel format changed to GSM\n");
+				  ast_log(LOG_NOTICE,"irlp channel format changed to %s\n",cp);
 			  proto = IRLP_ISGSM;
 		          ast->nativeformats = AST_FORMAT_GSM;
 		  }
 		  else if (!strncasecmp(cp,"UNCOMP",6))
 		  {
 			  if (proto == IRLP_NOPROTO)
-				  ast_log(LOG_NOTICE,"irlp channel format set to ULAW (UNCOMP)\n");
+				  ast_log(LOG_NOTICE,"irlp channel format set to ULAW (%s)\n",cp);
 			  else if (proto != IRLP_ISULAW)
-				  ast_log(LOG_NOTICE,"irlp channel format changed to ULAW (UNCOMP)\n");
+				  ast_log(LOG_NOTICE,"irlp channel format changed to ULAW (%s)\n",cp);
 			  proto = IRLP_ISULAW;
 		          ast->nativeformats = AST_FORMAT_ULAW;
 		  }
 		  else 
 		  {
 			  if (proto == IRLP_NOPROTO)
-				  ast_log(LOG_NOTICE,"irlp channel format set to ADPCM\n");
+				  ast_log(LOG_NOTICE,"irlp channel format set to %s\n",cp);
 			  else if (proto != IRLP_ISADPCM)
-				  ast_log(LOG_NOTICE,"irlp channel format changed to GSM\n");
+				  ast_log(LOG_NOTICE,"irlp channel format changed to %s\n",cp);
 			  proto = IRLP_ISADPCM;
 		          ast->nativeformats = AST_FORMAT_ADPCM;
 		  }
@@ -1062,9 +1063,9 @@
 int	destnode,hisnode,seqno,i,j;
 char	c;
 
-	struct irlp_pvt *p = ast->tech_pvt;
-
-	if (!p->txkey) return(0);
+/*	struct irlp_pvt *p = ast->tech_pvt; */
+
+/*	if (!p->txkey) return(0); */
 	if (text[0] != 'D') return 0;
 	if (sscanf(text + 2,"%d %d %d %c",&destnode,&hisnode,&seqno,&c) != 4) return(0);
 	if (destnode != (in_node + 40000)) return(0);




More information about the asterisk-commits mailing list