[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r114296 - in /team/sean...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 18 19:17:23 CDT 2008


Author: seanbright
Date: Fri Apr 18 19:17:22 2008
New Revision: 114296

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114296
Log:
Another small set of changes

Modified:
    team/seanbright/resolve-shadow-warnings/channels/chan_features.c
    team/seanbright/resolve-shadow-warnings/res/ael/ael.flex
    team/seanbright/resolve-shadow-warnings/res/ael/ael_lex.c

Modified: team/seanbright/resolve-shadow-warnings/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/channels/chan_features.c?view=diff&rev=114296&r1=114295&r2=114296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/channels/chan_features.c (original)
+++ team/seanbright/resolve-shadow-warnings/channels/chan_features.c Fri Apr 18 19:17:22 2008
@@ -153,40 +153,40 @@
 }
 #endif
 
-static void restore_channel(struct feature_pvt *p, int index)
+static void restore_channel(struct feature_pvt *p, int idx)
 {
 	/* Restore timing/alertpipe */
-	p->subs[index].owner->timingfd = p->subs[index].timingfdbackup;
-	p->subs[index].owner->alertpipe[0] = p->subs[index].alertpipebackup[0];
-	p->subs[index].owner->alertpipe[1] = p->subs[index].alertpipebackup[1];
-	ast_channel_set_fd(p->subs[index].owner, AST_ALERT_FD, p->subs[index].alertpipebackup[0]);
-	ast_channel_set_fd(p->subs[index].owner, AST_TIMING_FD, p->subs[index].timingfdbackup);
-}
-
-static void update_features(struct feature_pvt *p, int index)
-{
-	int x;
-	if (p->subs[index].owner) {
+	p->subs[idx].owner->timingfd = p->subs[idx].timingfdbackup;
+	p->subs[idx].owner->alertpipe[0] = p->subs[idx].alertpipebackup[0];
+	p->subs[idx].owner->alertpipe[1] = p->subs[idx].alertpipebackup[1];
+	ast_channel_set_fd(p->subs[idx].owner, AST_ALERT_FD, p->subs[idx].alertpipebackup[0]);
+	ast_channel_set_fd(p->subs[idx].owner, AST_TIMING_FD, p->subs[idx].timingfdbackup);
+}
+
+static void update_features(struct feature_pvt *p, int idx)
+{
+	int x;
+	if (p->subs[idx].owner) {
 		for (x=0; x<AST_MAX_FDS; x++) {
-			if (index) 
-				ast_channel_set_fd(p->subs[index].owner, x, -1);
+			if (idx) 
+				ast_channel_set_fd(p->subs[idx].owner, x, -1);
 			else
-				ast_channel_set_fd(p->subs[index].owner, x, p->subchan->fds[x]);
+				ast_channel_set_fd(p->subs[idx].owner, x, p->subchan->fds[x]);
 		}
-		if (!index) {
+		if (!idx) {
 			/* Copy timings from master channel */
-			p->subs[index].owner->timingfd = p->subchan->timingfd;
-			p->subs[index].owner->alertpipe[0] = p->subchan->alertpipe[0];
-			p->subs[index].owner->alertpipe[1] = p->subchan->alertpipe[1];
-			if (p->subs[index].owner->nativeformats != p->subchan->readformat) {
-				p->subs[index].owner->nativeformats = p->subchan->readformat;
-				if (p->subs[index].owner->readformat)
-					ast_set_read_format(p->subs[index].owner, p->subs[index].owner->readformat);
-				if (p->subs[index].owner->writeformat)
-					ast_set_write_format(p->subs[index].owner, p->subs[index].owner->writeformat);
+			p->subs[idx].owner->timingfd = p->subchan->timingfd;
+			p->subs[idx].owner->alertpipe[0] = p->subchan->alertpipe[0];
+			p->subs[idx].owner->alertpipe[1] = p->subchan->alertpipe[1];
+			if (p->subs[idx].owner->nativeformats != p->subchan->readformat) {
+				p->subs[idx].owner->nativeformats = p->subchan->readformat;
+				if (p->subs[idx].owner->readformat)
+					ast_set_read_format(p->subs[idx].owner, p->subs[idx].owner->readformat);
+				if (p->subs[idx].owner->writeformat)
+					ast_set_write_format(p->subs[idx].owner, p->subs[idx].owner->writeformat);
 			}
 		} else{
-			restore_channel(p, index);
+			restore_channel(p, idx);
 		}
 	}
 }
@@ -434,7 +434,7 @@
 	return tmp;
 }
 
-static struct ast_channel *features_new(struct feature_pvt *p, int state, int index)
+static struct ast_channel *features_new(struct feature_pvt *p, int state, int idx)
 {
 	struct ast_channel *tmp;
 	int x,y;
@@ -443,8 +443,8 @@
 		ast_log(LOG_WARNING, "Called upon channel with no subchan:(\n");
 		return NULL;
 	}
-	if (p->subs[index].owner) {
-		ast_log(LOG_WARNING, "Called to put index %d already there!\n", index);
+	if (p->subs[idx].owner) {
+		ast_log(LOG_WARNING, "Called to put index %d already there!\n", idx);
 		return NULL;
 	}
 	/* figure out what you want the name to be */
@@ -453,7 +453,7 @@
 			ast_free(b2);
 		asprintf(&b2, "%s/%s-%d", p->tech, p->dest, x);
 		for (y=0;y<3;y++) {
-			if (y == index)
+			if (y == idx)
 				continue;
 			if (p->subs[y].owner && !strcasecmp(p->subs[y].owner->name, b2))
 				break;
@@ -476,7 +476,7 @@
 	tmp->rawreadformat = p->subchan->rawreadformat;
 	tmp->nativeformats = p->subchan->readformat;
 	tmp->tech_pvt = p;
-	p->subs[index].owner = tmp;
+	p->subs[idx].owner = tmp;
 	if (!p->owner)
 		p->owner = tmp;
 	ast_module_ref(ast_module_info->self);

Modified: team/seanbright/resolve-shadow-warnings/res/ael/ael.flex
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/res/ael/ael.flex?view=diff&rev=114296&r1=114295&r2=114296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/res/ael/ael.flex (original)
+++ team/seanbright/resolve-shadow-warnings/res/ael/ael.flex Fri Apr 18 19:17:22 2008
@@ -571,7 +571,7 @@
 /* used elsewhere, but some local vars */
 struct pval *ael2_parse(char *filename, int *errors)
 {
-	struct pval *pval;
+	struct pval *pvalue;
 	struct parse_io *io;
 	char *buffer;
 	struct stat stats;
@@ -610,14 +610,14 @@
 	ael_yyparse(io);
 
 
-	pval = io->pval;
+	pvalue = io->pval;
 	*errors = io->syntax_error_count;
 
 	ael_yylex_destroy(io->scanner);
 	free(buffer);
 	free(io);
 
-	return pval;
+	return pvalue;
 }
 
 static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t yyscanner, int create)

Modified: team/seanbright/resolve-shadow-warnings/res/ael/ael_lex.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/res/ael/ael_lex.c?view=diff&rev=114296&r1=114295&r2=114296
==============================================================================
--- team/seanbright/resolve-shadow-warnings/res/ael/ael_lex.c (original)
+++ team/seanbright/resolve-shadow-warnings/res/ael/ael_lex.c Fri Apr 18 19:17:22 2008
@@ -3003,7 +3003,7 @@
 /* used elsewhere, but some local vars */
 struct pval *ael2_parse(char *filename, int *errors)
 {
-	struct pval *pval;
+	struct pval *pvalue;
 	struct parse_io *io;
 	char *buffer;
 	struct stat stats;
@@ -3042,14 +3042,14 @@
 	ael_yyparse(io);
 
 
-	pval = io->pval;
+	pvalue = io->pval;
 	*errors = io->syntax_error_count;
 
 	ael_yylex_destroy(io->scanner);
 	free(buffer);
 	free(io);
 
-	return pval;
+	return pvalue;
 }
 
 static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t yyscanner, int create)




More information about the asterisk-commits mailing list