[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r120281 - /team/jdixon/chan_usbradio-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 4 00:00:59 CDT 2008
Author: jdixon
Date: Wed Jun 4 00:00:58 2008
New Revision: 120281
URL: http://svn.digium.com/view/asterisk?view=rev&rev=120281
Log:
Fixed problem with different extnode spaces
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=120281&r1=120280&r2=120281
==============================================================================
--- team/jdixon/chan_usbradio-1.4/apps/app_rpt.c (original)
+++ team/jdixon/chan_usbradio-1.4/apps/app_rpt.c Wed Jun 4 00:00:58 2008
@@ -21,7 +21,7 @@
/*! \file
*
* \brief Radio Repeater / Remote Base program
- * version 0.118 5/29/08 2055 EDT
+ * version 0.119 6/03/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.118 5/29/2008";
+static char *tdesc = "Radio Repeater / Remote Base version 0.119 6/03/2008";
static char *app = "Rpt";
@@ -1988,7 +1988,6 @@
char *val;
int longestnode,j;
struct stat mystat;
-static time_t last = 0;
static struct ast_config *ourcfg = NULL;
struct ast_variable *vp;
@@ -2004,44 +2003,37 @@
ast_mutex_unlock(&nodelookuplock);
return(NULL);
}
- /* if we need to reload */
- if (mystat.st_mtime > last)
- {
- if (ourcfg) ast_config_destroy(ourcfg);
+ if (ourcfg) ast_config_destroy(ourcfg);
#ifdef NEW_ASTERISK
- ourcfg = ast_config_load(myrpt->p.extnodefile,config_flags);
+ ourcfg = ast_config_load(myrpt->p.extnodefile,config_flags);
#else
- ourcfg = ast_config_load(myrpt->p.extnodefile);
+ ourcfg = ast_config_load(myrpt->p.extnodefile);
#endif
- /* if file not there, just bail */
- if (!ourcfg)
- {
- ast_mutex_unlock(&nodelookuplock);
- return(NULL);
- }
- /* reset "last" time */
- last = mystat.st_mtime;
-
- /* determine longest node length again */
- longestnode = 0;
- vp = ast_variable_browse(myrpt->cfg, myrpt->p.nodes);
- while(vp){
- j = strlen(vp->name);
- if (j > longestnode)
- longestnode = j;
- vp = vp->next;
- }
-
- vp = ast_variable_browse(ourcfg, myrpt->p.extnodes);
- while(vp){
- j = strlen(vp->name);
- if (j > longestnode)
- longestnode = j;
- vp = vp->next;
- }
-
- myrpt->longestnode = longestnode;
- }
+ /* if file not there, just bail */
+ if (!ourcfg)
+ {
+ ast_mutex_unlock(&nodelookuplock);
+ return(NULL);
+ }
+
+ /* determine longest node length again */
+ longestnode = 0;
+ vp = ast_variable_browse(myrpt->cfg, myrpt->p.nodes);
+ while(vp){
+ j = strlen(vp->name);
+ if (j > longestnode)
+ longestnode = j;
+ vp = vp->next;
+ }
+ vp = ast_variable_browse(ourcfg, myrpt->p.extnodes);
+ while(vp){
+ j = strlen(vp->name);
+ if (j > longestnode)
+ longestnode = j;
+ vp = vp->next;
+ }
+
+ myrpt->longestnode = longestnode;
val = NULL;
if (ourcfg)
val = (char *) ast_variable_retrieve(ourcfg, myrpt->p.extnodes, digitbuf);
More information about the asterisk-commits
mailing list