[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r151012 - /team/jdixon/chan_usbradio-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Oct 18 10:01:02 CDT 2008
Author: jdixon
Date: Sat Oct 18 10:01:00 2008
New Revision: 151012
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151012
Log:
Fixed issue with echolink/irlp command processing and prepared program
for new command/telemetry changes
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=151012&r1=151011&r2=151012
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_rpt.c Sat Oct 18 10:01:00 2008
@@ -22,7 +22,7 @@
/*! \file
*
* \brief Radio Repeater / Remote Base program
- * version 0.153 10/17/08
+ * version 0.153 10/18/08
*
* \author Jim Dixon, WB6NIL <jim at lambdatel.com>
*
@@ -383,7 +383,7 @@
/*! Stop the tones from playing */
void ast_playtones_stop(struct ast_channel *chan);
-static char *tdesc = "Radio Repeater / Remote Base version 0.153 10/17/2008";
+static char *tdesc = "Radio Repeater / Remote Base version 0.153 10/18/2008";
static char *app = "Rpt";
@@ -6207,12 +6207,14 @@
case 4: /* Enter Command Mode */
/* if doesnt allow link cmd, or no links active, return */
- if (((command_source != SOURCE_RPT) &&
+ if (myrpt->links.next == &myrpt->links) return DC_COMPLETE;
+ if ((command_source != SOURCE_RPT) &&
(command_source != SOURCE_PHONE) &&
(command_source != SOURCE_ALT) &&
- (command_source != SOURCE_DPHONE)) ||
- (myrpt->links.next == &myrpt->links))
- return DC_COMPLETE;
+ (command_source != SOURCE_DPHONE) && mylink &&
+ strncasecmp(mylink->chan->name,"echolink",8) &&
+ strncasecmp(mylink->chan->name,"irlp",4))
+ return DC_COMPLETE;
/* if already in cmd mode, or selected self, fughetabahtit */
if ((myrpt->cmdnode[0]) || (!strcmp(myrpt->name, digitbuf))){
@@ -7314,8 +7316,8 @@
if (c == myrpt->p.endchar)
{
if (mylink->lastrx &&
- ((strncmp(mylink->chan->name,"echolink",8)) ||
- strncmp(mylink->chan->name,"irlp",4)))
+ strncasecmp(mylink->chan->name,"echolink",8) &&
+ strncasecmp(mylink->chan->name,"irlp",4))
{
mylink->lastrealrx = 0;
rpt_mutex_unlock(&myrpt->lock);
@@ -7407,17 +7409,8 @@
SOURCE_ALT,mylink);
break;
default:
- if ((!strncasecmp(mylink->chan->name,"echolink",8)) ||
- (!strncasecmp(mylink->chan->name,"irlp",4)))
- {
- res = collect_function_digits(myrpt, cmd,
- SOURCE_RPT, mylink);
- }
- else
- {
- res = collect_function_digits(myrpt, cmd,
- SOURCE_LNK, mylink);
- }
+ res = collect_function_digits(myrpt, cmd,
+ SOURCE_LNK, mylink);
break;
}
More information about the asterisk-commits
mailing list