[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r155705 - /team/jdixon/chan_usbradio-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Nov 9 12:26:53 CST 2008
Author: jdixon
Date: Sun Nov 9 12:26:53 2008
New Revision: 155705
URL: http://svn.digium.com/view/asterisk?view=rev&rev=155705
Log:
Fixed bugs with locallist stuff
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=155705&r1=155704&r2=155705
==============================================================================
--- team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/dev-temp/app_rpt.c Sun Nov 9 12:26:53 2008
@@ -22,7 +22,7 @@
/*! \file
*
* \brief Radio Repeater / Remote Base program
- * version 0.163 11/8/08
+ * version 0.164 11/9/08
*
* \author Jim Dixon, WB6NIL <jim at lambdatel.com>
*
@@ -315,7 +315,7 @@
MEMNOTFOUND, INVFREQ, REMMODE, REMLOGIN, REMXXX, REMSHORTSTATUS,
REMLONGSTATUS, LOGINREQ, SCAN, SCANSTAT, TUNE, SETREMOTE, TOPKEY,
TIMEOUT_WARNING, ACT_TIMEOUT_WARNING, LINKUNKEY, UNAUTHTX, PARROT,
- STATS_TIME_LOCAL, VARCMD};
+ STATS_TIME_LOCAL, VARCMD, LOCUNKEY};
enum {REM_SIMPLEX,REM_MINUS,REM_PLUS};
@@ -408,7 +408,7 @@
/*! Stop the tones from playing */
void ast_playtones_stop(struct ast_channel *chan);
-static char *tdesc = "Radio Repeater / Remote Base version 0.163 11/8/2008";
+static char *tdesc = "Radio Repeater / Remote Base version 0.164 11/9/2008";
static char *app = "Rpt";
@@ -4559,7 +4559,7 @@
rpt_mutex_unlock(&myrpt->lock);
while((mytele->mode != SETREMOTE) && (mytele->mode != UNKEY) &&
- (mytele->mode != LINKUNKEY))
+ (mytele->mode != LINKUNKEY) && (mytele->mode != LOCUNKEY))
{
rpt_mutex_lock(&myrpt->lock);
if (!myrpt->active_telem)
@@ -4659,6 +4659,7 @@
res = ast_streamfile(mychannel, "rpt/macro_busy", mychannel->language);
break;
case UNKEY:
+ case LOCUNKEY:
if(myrpt->patchnoct && myrpt->callmode){ /* If no CT during patch configured, then don't send one */
imdone = 1;
break;
@@ -4683,7 +4684,8 @@
{
rpt_mutex_lock(&myrpt->lock);
while(tlist != &myrpt->tele){
- if (tlist->mode == UNKEY) unkeys_queued++;
+ if ((tlist->mode == UNKEY) ||
+ (tlist->mode == LOCUNKEY)) unkeys_queued++;
tlist = tlist->next;
}
rpt_mutex_unlock(&myrpt->lock);
@@ -4725,6 +4727,19 @@
myrpt->totalkerchunks++;
rpt_mutex_unlock(&myrpt->lock);
+ if ((mytele->mode == LOCUNKEY) &&
+ ((ct = (char *) ast_variable_retrieve(myrpt->cfg, nodename, "localct")))) { /* Local override ct */
+ ct_copy = ast_strdup(ct);
+ if(ct_copy)
+ {
+ res = telem_lookup(myrpt,mychannel, myrpt->name, ct_copy);
+ ast_free(ct_copy);
+ }
+ else
+ res = -1;
+ if(res)
+ ast_log(LOG_WARNING, "telem_lookup:ctx failed on %s\n", mychannel->name);
+ }
haslink = 0;
hastx = 0;
hasremote = 0;
@@ -5788,6 +5803,7 @@
if (myrpt->telemmode < 2) return;
break;
case UNKEY:
+ case LOCUNKEY:
/* if any of the following are defined, go ahead and do it,
otherwise, dont bother */
v1 = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->name,
@@ -5954,7 +5970,7 @@
else mylink = (struct rpt_link *) data;
rpt_mutex_lock(&myrpt->lock);
if((mode == CONNFAIL) || (mode == REMDISC) || (mode == CONNECTED) ||
- (mode == LINKUNKEY)){
+ (mode == LINKUNKEY) || (mode == LOCUNKEY)){
memset(&tele->mylink,0,sizeof(struct rpt_link));
if (mylink){
memcpy(&tele->mylink,mylink,sizeof(struct rpt_link));
@@ -13418,7 +13434,7 @@
if (myrpt->lastf2)
memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
dtmfed = 1;
- if (!myrpt->keyed) continue;
+ if ((!myrpt->keyed) && (!myrpt->localoverride)) continue;
c = func_xlat(myrpt,c,&myrpt->p.inxlat);
if (c) local_dtmf_helper(myrpt,c);
continue;
@@ -13514,6 +13530,10 @@
}
}
myrpt->keyed = 0;
+ if ((myrpt->p.duplex > 1) && myrpt->localoverride)
+ {
+ rpt_telemetry(myrpt,LOCUNKEY,NULL);
+ }
myrpt->localoverride = 0;
time(&myrpt->lastkeyedtime);
myrpt->keyposttimer = KEYPOSTSHORTTIME;
More information about the asterisk-commits
mailing list