[svn-commits] jdixon: branch jdixon/chan_usbradio-1.4 r139454 - /team/jdixon/chan_usbradio-...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 22 11:40:34 CDT 2008
Author: jdixon
Date: Fri Aug 22 11:40:34 2008
New Revision: 139454
URL: http://svn.digium.com/view/asterisk?view=rev&rev=139454
Log:
Fixed more stuff for echolink
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=139454&r1=139453&r2=139454
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_rpt.c Fri Aug 22 11:40:34 2008
@@ -21,7 +21,7 @@
/*! \file
*
* \brief Radio Repeater / Remote Base program
- * version 0.126 8/22/08 2055 EDT
+ * version 0.127 8/22/08 2055 EDT
*
* \author Jim Dixon, WB6NIL <jim at lambdatel.com>
*
@@ -374,7 +374,7 @@
/*! Stop the tones from playing */
void ast_playtones_stop(struct ast_channel *chan);
-static char *tdesc = "Radio Repeater / Remote Base version 0.126 8/22/2008";
+static char *tdesc = "Radio Repeater / Remote Base version 0.127 8/22/2008";
static char *app = "Rpt";
@@ -5600,6 +5600,7 @@
struct ast_frame wf;
struct rpt_link *l;
+
snprintf(str, sizeof(str), "D %s %s %d %c", myrpt->cmdnode, myrpt->name, ++(myrpt->dtmfidx), c);
wf.frametype = AST_FRAME_TEXT;
wf.subclass = 0;
@@ -5689,7 +5690,7 @@
static int connect_link(struct rpt *myrpt, char* node, int mode, int perma)
{
- char *val, *s, *s1, *s2, *tele;
+ char *val, *s, *s1, *s2, *tele,*cp,*tel1;
char lstr[MAXLINKLIST],*strs[MAXLINKLIST];
char tmp[300], deststr[300] = "",modechange = 0;
char sx[320],*sy;
@@ -5803,7 +5804,19 @@
return -1;
}
*tele++ = 0;
- l->chan = ast_request(deststr, AST_FORMAT_SLINEAR, tele,NULL);
+ if (!strncasecmp(deststr,"echolink",8))
+ {
+ tel1 = strdup(tele);
+ cp = strchr(tel1,'/');
+ if (cp) cp++; else cp = tel1;
+ strcpy(cp,node);
+ l->chan = ast_request(deststr, AST_FORMAT_SLINEAR, /* tele */ tel1,NULL);
+ free(tel1);
+ }
+ else
+ {
+ l->chan = ast_request(deststr, AST_FORMAT_SLINEAR,tele,NULL);
+ }
if (l->chan){
ast_set_read_format(l->chan, AST_FORMAT_SLINEAR);
ast_set_write_format(l->chan, AST_FORMAT_SLINEAR);
@@ -7063,7 +7076,7 @@
{
if (c == myrpt->p.endchar)
{
- if (mylink->lastrx)
+ if (mylink->lastrx && strncmp(mylink->chan->name,"echolink",8))
{
mylink->lastrealrx = 0;
rpt_mutex_unlock(&myrpt->lock);
@@ -10453,8 +10466,6 @@
char sx[320],*sy;
- return 0;
-
val = node_lookup(myrpt,l->name);
if (!val)
{
@@ -10462,6 +10473,8 @@
return -1;
}
+ /* cannot apply to echolink */
+ if (!strncasecmp(val,"echolink",8)) return 0;
rpt_mutex_lock(&myrpt->lock);
/* remove from queue */
remque((struct qelem *) l);
@@ -13779,7 +13792,6 @@
rpt_mutex_lock(&myrpt->lock);
if ((phone_mode == 2) && (!phone_vox)) l->lastrealrx = 1;
l->max_retries = MAX_RETRIES;
-/* foop */ l->retries = l->max_retries + 1;
/* insert at end of queue */
insque((struct qelem *)l,(struct qelem *)myrpt->links.next);
__kickshort(myrpt);
More information about the svn-commits
mailing list