[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r114309 - /team/seanbri...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 19 15:53:18 CDT 2008


Author: seanbright
Date: Sat Apr 19 15:53:18 2008
New Revision: 114309

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114309
Log:
apps/

Modified:
    team/seanbright/resolve-shadow-warnings/apps/app_adsiprog.c
    team/seanbright/resolve-shadow-warnings/apps/app_dial.c
    team/seanbright/resolve-shadow-warnings/apps/app_directory.c
    team/seanbright/resolve-shadow-warnings/apps/app_disa.c
    team/seanbright/resolve-shadow-warnings/apps/app_festival.c
    team/seanbright/resolve-shadow-warnings/apps/app_macro.c
    team/seanbright/resolve-shadow-warnings/apps/app_meetme.c
    team/seanbright/resolve-shadow-warnings/apps/app_minivm.c
    team/seanbright/resolve-shadow-warnings/apps/app_playback.c
    team/seanbright/resolve-shadow-warnings/apps/app_queue.c
    team/seanbright/resolve-shadow-warnings/apps/app_record.c
    team/seanbright/resolve-shadow-warnings/apps/app_rpt.c
    team/seanbright/resolve-shadow-warnings/apps/app_sms.c
    team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
    team/seanbright/resolve-shadow-warnings/apps/app_waituntil.c
    team/seanbright/resolve-shadow-warnings/apps/app_while.c
    team/seanbright/resolve-shadow-warnings/apps/app_zapbarge.c
    team/seanbright/resolve-shadow-warnings/apps/app_zapscan.c

Modified: team/seanbright/resolve-shadow-warnings/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_adsiprog.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_adsiprog.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_adsiprog.c Sat Apr 19 15:53:18 2008
@@ -776,7 +776,7 @@
 static int subscript(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
 {
 	char *tok = get_token(&args, script, lineno);
-	char subscript[80];
+	char subscr[80];
 	struct adsi_subscript *sub;
 
 	if (!tok) {
@@ -784,12 +784,12 @@
 		return 0;
 	}
 
-	if (process_token(subscript, tok, sizeof(subscript) - 1, ARG_STRING)) {
+	if (process_token(subscr, tok, sizeof(subscr) - 1, ARG_STRING)) {
 		ast_log(LOG_WARNING, "Invalid number of seconds '%s' at line %d of %s\n", tok, lineno, script);
 		return 0;
 	}
 
-	if (!(sub = getsubbyname(state, subscript, script, lineno)))
+	if (!(sub = getsubbyname(state, subscr, script, lineno)))
 		return 0;
 
 	buf[0] = 0x9d;
@@ -801,7 +801,7 @@
 static int onevent(char *buf, char *name, int id, char *args, struct adsi_script *state, char *script, int lineno)
 {
 	char *tok = get_token(&args, script, lineno);
-	char subscript[80], sname[80];
+	char subscr[80], sname[80];
 	int sawin = 0, event, snums[8], scnt = 0, x;
 	struct adsi_subscript *sub;
 
@@ -848,11 +848,11 @@
 		ast_log(LOG_WARNING, "Missing subscript to call at line %d of %s\n", lineno, script);
 		return 0;
 	}
-	if (process_token(subscript, tok, sizeof(subscript) - 1, ARG_STRING)) {
+	if (process_token(subscr, tok, sizeof(subscr) - 1, ARG_STRING)) {
 		ast_log(LOG_WARNING, "Invalid subscript '%s' at line %d of %s\n", tok, lineno, script);
 		return 0;
 	}
-	if (!(sub = getsubbyname(state, subscript, script, lineno)))
+	if (!(sub = getsubbyname(state, subscr, script, lineno)))
 		return 0;
 	buf[0] = 8;
 	buf[1] = event;

Modified: team/seanbright/resolve-shadow-warnings/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_dial.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_dial.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_dial.c Sat Apr 19 15:53:18 2008
@@ -1978,7 +1978,7 @@
 {
 	char *parse;
 	const char *context = NULL;
-	int sleep = 0, loops = 0, res = -1;
+	int sleepms = 0, loops = 0, res = -1;
 	struct ast_flags64 peerflags = { 0, };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(announce);
@@ -1995,8 +1995,8 @@
 	parse = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, parse);
 
-	if ((sleep = atoi(args.sleep)))
-		sleep *= 1000;
+	if ((sleepms = atoi(args.sleep)))
+		sleepms *= 1000;
 
 	loops = atoi(args.retries);
 
@@ -2005,8 +2005,8 @@
 		goto done;
 	}
 
-	if (sleep < 1000)
-		sleep = 10000;
+	if (sleepms < 1000)
+		sleepms = 10000;
 
 	if (!loops)
 		loops = -1; /* run forever */
@@ -2034,10 +2034,10 @@
 					} else
 						ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce);
 				}
-				if (!res && sleep) {
+				if (!res && sleepms) {
 					if (!ast_test_flag(chan, AST_FLAG_MOH))
 						ast_moh_start(chan, NULL, NULL);
-					res = ast_waitfordigit(chan, sleep);
+					res = ast_waitfordigit(chan, sleepms);
 				}
 			} else {
 				if (!ast_strlen_zero(args.announce)) {
@@ -2047,11 +2047,11 @@
 					} else
 						ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce);
 				}
-				if (sleep) {
+				if (sleepms) {
 					if (!ast_test_flag(chan, AST_FLAG_MOH))
 						ast_moh_start(chan, NULL, NULL);
 					if (!res)
-						res = ast_waitfordigit(chan, sleep);
+						res = ast_waitfordigit(chan, sleepms);
 				}
 			}
 		}

Modified: team/seanbright/resolve-shadow-warnings/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_directory.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_directory.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_directory.c Sat Apr 19 15:53:18 2008
@@ -628,23 +628,23 @@
 
 	if (ucfg) {
 		for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
-			const char *pos;
+			const char *position;
 			if (!strcasecmp(cat, "general"))
 				continue;
 			if (!ast_true(ast_config_option(ucfg, cat, "hasdirectory")))
 				continue;
 
 			/* Find all candidate extensions */
-			pos = ast_variable_retrieve(ucfg, cat, "fullname");
-			if (!pos)
+			position = ast_variable_retrieve(ucfg, cat, "fullname");
+			if (!position)
 				continue;
 
 			res = 0;
 			if (ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
-				res = check_match(&item, pos, v->name, ext, 0 /* use_first_name */);
+				res = check_match(&item, position, v->name, ext, 0 /* use_first_name */);
 			}
 			if (!res && ast_test_flag(&flags, OPT_LISTBYFIRSTNAME)) {
-				res = check_match(&item, pos, v->name, ext, 1 /* use_first_name */);
+				res = check_match(&item, position, v->name, ext, 1 /* use_first_name */);
 			}
 
 			if (!res)

Modified: team/seanbright/resolve-shadow-warnings/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_disa.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_disa.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_disa.c Sat Apr 19 15:53:18 2008
@@ -316,7 +316,7 @@
 
 	if (k == 3) {
 		int recheck = 0;
-		struct ast_flags flags = { AST_CDR_FLAG_POSTED };
+		struct ast_flags cdrflags = { AST_CDR_FLAG_POSTED };
 
 		if (!ast_exists_extension(chan, args.context, exten, 1, chan->cid.cid_num)) {
 			pbx_builtin_setvar_helper(chan, "INVALID_EXTEN", exten);
@@ -335,8 +335,8 @@
 			if (!ast_strlen_zero(acctcode))
 				ast_string_field_set(chan, accountcode, acctcode);
 
-			if (special_noanswer) flags.flags = 0;
-			ast_cdr_reset(chan->cdr, &flags);
+			if (special_noanswer) cdrflags.flags = 0;
+			ast_cdr_reset(chan->cdr, &cdrflags);
 			ast_explicit_goto(chan, args.context, exten, 1);
 			return 0;
 		}

Modified: team/seanbright/resolve-shadow-warnings/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_festival.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_festival.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_festival.c Sat Apr 19 15:53:18 2008
@@ -330,22 +330,22 @@
 		snprintf(newfestivalcommand, strln, "%s%s%s", startcmd, args.text, endcmd);
 		festivalcommand = newfestivalcommand;
 	} else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
-		int i, j;
+		int x, j;
 		newfestivalcommand = alloca(strlen(festivalcommand) + strlen(args.text) + 1);
 
-		for (i = 0, j = 0; i < strlen(festivalcommand); i++) {
-			if (festivalcommand[i] == '\\' && festivalcommand[i + 1] == 'n') {
+		for (x = 0, j = 0; x < strlen(festivalcommand); x++) {
+			if (festivalcommand[x] == '\\' && festivalcommand[x + 1] == 'n') {
 				newfestivalcommand[j++] = '\n';
 				i++;
-			} else if (festivalcommand[i] == '\\') {
-				newfestivalcommand[j++] = festivalcommand[i + 1];
+			} else if (festivalcommand[x] == '\\') {
+				newfestivalcommand[j++] = festivalcommand[x + 1];
 				i++;
-			} else if (festivalcommand[i] == '%' && festivalcommand[i + 1] == 's') {
+			} else if (festivalcommand[x] == '%' && festivalcommand[x + 1] == 's') {
 				sprintf(&newfestivalcommand[j], "%s", args.text); /* we know it is big enough */
 				j += strlen(args.text);
-				i++;
+				x++;
 			} else
-				newfestivalcommand[j++] = festivalcommand[i];
+				newfestivalcommand[j++] = festivalcommand[x];
 		}
 		newfestivalcommand[j] = '\0';
 		festivalcommand = newfestivalcommand;

Modified: team/seanbright/resolve-shadow-warnings/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_macro.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_macro.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_macro.c Sat Apr 19 15:53:18 2008
@@ -248,13 +248,13 @@
 	chan->priority = 1;
 
 	while((cur = strsep(&rest, ",")) && (argc < MAX_ARGS)) {
-		const char *s;
+		const char *argp;
   		/* Save copy of old arguments if we're overwriting some, otherwise
 	   	let them pass through to the other macro */
   		snprintf(varname, sizeof(varname), "ARG%d", argc);
-		s = pbx_builtin_getvar_helper(chan, varname);
-		if (s)
-			oldargs[argc] = ast_strdup(s);
+		argp = pbx_builtin_getvar_helper(chan, varname);
+		if (argp)
+			oldargs[argc] = ast_strdup(argp);
 		pbx_builtin_setvar_helper(chan, varname, cur);
 		argc++;
 	}
@@ -323,12 +323,12 @@
 			gosub_level++;
 			ast_debug(1, "Incrementing gosub_level\n");
 		} else if (!strcasecmp(runningapp, "GOSUBIF")) {
-			char tmp2[1024], *cond, *app, *app2 = tmp2;
+			char tmp2[1024], *cond, *app_arg, *app2 = tmp2;
 			pbx_substitute_variables_helper(chan, runningdata, tmp2, sizeof(tmp2) - 1);
 			cond = strsep(&app2, "?");
-			app = strsep(&app2, ":");
+			app_arg = strsep(&app2, ":");
 			if (pbx_checkcondition(cond)) {
-				if (!ast_strlen_zero(app)) {
+				if (!ast_strlen_zero(app_arg)) {
 					gosub_level++;
 					ast_debug(1, "Incrementing gosub_level\n");
 				}

Modified: team/seanbright/resolve-shadow-warnings/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_meetme.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_meetme.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_meetme.c Sat Apr 19 15:53:18 2008
@@ -1506,7 +1506,7 @@
 	int announcement_played = 0;
 	struct timeval now;
 	struct ast_dsp *dsp = NULL;
-	struct ast_app *app;
+	struct ast_app *agi_app;
 	const char *agifile;
 	const char *agifiledefault = "conf-background.agi";
 	char meetmesecs[30] = "";
@@ -1942,10 +1942,10 @@
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}
 		/* Find a pointer to the agi app and execute the script */
-		app = pbx_findapp("agi");
-		if (app) {
+		agi_app = pbx_findapp("agi");
+		if (agi_app) {
 			char *s = ast_strdupa(agifile);
-			ret = pbx_exec(chan, app, s);
+			ret = pbx_exec(chan, agi_app, s);
 		} else {
 			ast_log(LOG_WARNING, "Could not find application (agi)\n");
 			ret = -2;
@@ -2545,27 +2545,27 @@
 						((confflags & CONFFLAG_MONITOR) || 
 						 (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) ||
 						 (!user->talking)) ) {
-						int index;
-						for (index = 0; index < AST_FRAME_BITS; index++)
-							if (chan->rawwriteformat & (1 << index))
+						int idx;
+						for (idx = 0; idx < AST_FRAME_BITS; idx++)
+							if (chan->rawwriteformat & (1 << idx))
 								break;
-						if (index >= AST_FRAME_BITS)
+						if (idx >= AST_FRAME_BITS)
 							goto bailoutandtrynormal;
 						ast_mutex_lock(&conf->listenlock);
-						if (!conf->transframe[index]) {
+						if (!conf->transframe[idx]) {
 							if (conf->origframe) {
-								if (!conf->transpath[index])
-									conf->transpath[index] = ast_translator_build_path((1 << index), AST_FORMAT_SLINEAR);
-								if (conf->transpath[index]) {
-									conf->transframe[index] = ast_translate(conf->transpath[index], conf->origframe, 0);
-									if (!conf->transframe[index])
-										conf->transframe[index] = &ast_null_frame;
+								if (!conf->transpath[idx])
+									conf->transpath[idx] = ast_translator_build_path((1 << idx), AST_FORMAT_SLINEAR);
+								if (conf->transpath[idx]) {
+									conf->transframe[idx] = ast_translate(conf->transpath[idx], conf->origframe, 0);
+									if (!conf->transframe[idx])
+										conf->transframe[idx] = &ast_null_frame;
 								}
 							}
 						}
-						if (conf->transframe[index]) {
- 							if (conf->transframe[index]->frametype != AST_FRAME_NULL) {
-	 							if (ast_write(chan, conf->transframe[index]))
+						if (conf->transframe[idx]) {
+ 							if (conf->transframe[idx]->frametype != AST_FRAME_NULL) {
+	 							if (ast_write(chan, conf->transframe[idx]))
 									ast_log(LOG_WARNING, "Unable to write frame to channel %s\n", chan->name);
 							}
 						} else {
@@ -3991,7 +3991,7 @@
  * \note Assumes that sla.lock is locked
  */
 static struct sla_ringing_trunk *sla_choose_ringing_trunk(struct sla_station *station, 
-	struct sla_trunk_ref **trunk_ref, int remove)
+	struct sla_trunk_ref **trunk_ref, int rm)
 {
 	struct sla_trunk_ref *s_trunk_ref;
 	struct sla_ringing_trunk *ringing_trunk = NULL;
@@ -4007,7 +4007,7 @@
 			if (sla_check_timed_out_station(ringing_trunk, station))
 				continue;
 
-			if (remove)
+			if (rm)
 				AST_LIST_REMOVE_CURRENT(entry);
 
 			if (trunk_ref)
@@ -4522,7 +4522,7 @@
 static int sla_process_timers(struct timespec *ts)
 {
 	unsigned int timeout = UINT_MAX;
-	struct timeval tv;
+	struct timeval wait;
 	unsigned int change_made = 0;
 
 	/* Check for ring timeouts on ringing trunks */
@@ -4546,9 +4546,9 @@
 		return 0;
 
 	if (ts) {
-		tv = ast_tvadd(ast_tvnow(), ast_samp2tv(timeout, 1000));
-		ts->tv_sec = tv.tv_sec;
-		ts->tv_nsec = tv.tv_usec * 1000;
+		wait = ast_tvadd(ast_tvnow(), ast_samp2tv(timeout, 1000));
+		ts->tv_sec = wait.tv_sec;
+		ts->tv_nsec = wait.tv_usec * 1000;
 	}
 
 	return 1;

Modified: team/seanbright/resolve-shadow-warnings/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_minivm.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_minivm.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_minivm.c Sat Apr 19 15:53:18 2008
@@ -706,9 +706,9 @@
 static int get_date(char *s, int len)
 {
 	struct ast_tm tm;
-	struct timeval tv = ast_tvnow();
-
-	ast_localtime(&tv, &tm, NULL);
+	struct timeval now = ast_tvnow();
+
+	ast_localtime(&now, &tm, NULL);
 	return ast_strftime(s, len, "%a %b %e %r %Z %Y", &tm);
 }
 
@@ -1039,18 +1039,18 @@
 		fprintf(p, "To: %s <%s@%s>\n", mailheader_quote(vmu->fullname, passdata2, len_passdata), vmu->username, vmu->domain);
 
 	if (!ast_strlen_zero(template->subject)) {
-		char *passdata;
+		char *pass_data;
 		int vmlen = strlen(template->subject) * 3 + 200;
-		if ((passdata = alloca(vmlen))) {
-			pbx_substitute_variables_helper(ast, template->subject, passdata, vmlen);
-			fprintf(p, "Subject: %s\n", passdata);
+		if ((pass_data = alloca(vmlen))) {
+			pbx_substitute_variables_helper(ast, template->subject, pass_data, vmlen);
+			fprintf(p, "Subject: %s\n", pass_data);
 		} else {
 			ast_log(LOG_WARNING, "Cannot allocate workspace for variable substitution\n");
 			fclose(p);
 			return -1;	
 		}
 
-		ast_debug(4, "-_-_- Subject now: %s\n", passdata);
+		ast_debug(4, "-_-_- Subject now: %s\n", pass_data);
 
 	} else  {
 		fprintf(p, "Subject: New message in mailbox %s@%s\n", vmu->username, vmu->domain);
@@ -1070,12 +1070,12 @@
 	fprintf(p, "--%s\n", bound);
 	fprintf(p, "Content-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n\n", global_charset);
 	if (!ast_strlen_zero(template->body)) {
-		char *passdata;
+		char *pass_data;
 		int vmlen = strlen(template->body)*3 + 200;
-		if ((passdata = alloca(vmlen))) {
-			pbx_substitute_variables_helper(ast, template->body, passdata, vmlen);
-			ast_debug(3, "Message now: %s\n-----\n", passdata);
-			fprintf(p, "%s\n", passdata);
+		if ((pass_data = alloca(vmlen))) {
+			pbx_substitute_variables_helper(ast, template->body, pass_data, vmlen);
+			ast_debug(3, "Message now: %s\n-----\n", pass_data);
+			fprintf(p, "%s\n", pass_data);
 		} else
 			ast_log(LOG_WARNING, "Cannot allocate workspace for variable substitution\n");
 	} else {
@@ -1399,11 +1399,11 @@
 	strsep(&stringp, "|");
 
 	if (!ast_strlen_zero(etemplate->locale)) {
-		char *newlocale;
+		char *new_locale;
 		ast_copy_string(oldlocale, setlocale(LC_TIME, NULL), sizeof(oldlocale));
 		ast_debug(2, "-_-_- Changing locale from %s to %s\n", oldlocale, etemplate->locale);
-		newlocale = setlocale(LC_TIME, etemplate->locale);
-		if (newlocale == NULL) {
+		new_locale = setlocale(LC_TIME, etemplate->locale);
+		if (new_locale == NULL) {
 			ast_log(LOG_WARNING, "-_-_- Changing to new locale did not work. Locale: %s\n", etemplate->locale);
 		}
 	}
@@ -2175,7 +2175,7 @@
 {
 
 	struct minivm_zone *newzone;
-	char *msg_format, *timezone;
+	char *msg_format, *timezone_str;
 
 	newzone = ast_calloc(1, sizeof(*newzone));
 	if (newzone == NULL)
@@ -2188,7 +2188,7 @@
 		return 0;
 	}
 
-	timezone = strsep(&msg_format, "|");
+	timezone_str = strsep(&msg_format, "|");
 	if (!msg_format) {
 		ast_log(LOG_WARNING, "Invalid timezone definition : %s\n", zonename);
 		ast_free(newzone);
@@ -2196,7 +2196,7 @@
 	}
 			
 	ast_copy_string(newzone->name, zonename, sizeof(newzone->name));
-	ast_copy_string(newzone->timezone, timezone, sizeof(newzone->timezone));
+	ast_copy_string(newzone->timezone, timezone_str, sizeof(newzone->timezone));
 	ast_copy_string(newzone->msg_format, msg_format, sizeof(newzone->msg_format));
 
 	AST_LIST_LOCK(&minivm_zones);
@@ -2656,7 +2656,7 @@
 /*! \brief Show stats */
 static char *handle_minivm_show_stats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ast_tm time;
+	struct ast_tm timebuf;
 	char buf[BUFSIZ];
 
 	switch (cmd) {
@@ -2681,12 +2681,12 @@
 		ast_cli(a->fd, "  Received messages since last reset:  <none>\n");
 	} else {
 		ast_cli(a->fd, "  Received messages since last reset:  %d\n", global_stats.receivedmessages);
-		ast_localtime(&global_stats.lastreceived, &time, NULL);
-		ast_strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &time);
+		ast_localtime(&global_stats.lastreceived, &timebuf, NULL);
+		ast_strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &timebuf);
 		ast_cli(a->fd, "  Last received voicemail:             %s\n", buf);
 	}
-	ast_localtime(&global_stats.reset, &time, NULL);
-	ast_strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &time);
+	ast_localtime(&global_stats.reset, &timebuf, NULL);
+	ast_strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &timebuf);
 	ast_cli(a->fd, "  Last reset:                          %s\n", buf);
 
 	ast_cli(a->fd, "\n");

Modified: team/seanbright/resolve-shadow-warnings/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_playback.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_playback.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_playback.c Sat Apr 19 15:53:18 2008
@@ -275,16 +275,16 @@
 }
 
 static int say_date_generic(struct ast_channel *chan, time_t t,
-	const char *ints, const char *lang, const char *format, const char *timezone, const char *prefix)
+	const char *ints, const char *lang, const char *format, const char *timezonename, const char *prefix)
 {
 	char buf[128];
 	struct ast_tm tm;
-	struct timeval tv = { t, 0 };
+	struct timeval when = { t, 0 };
         say_args_t a = { chan, ints, lang, -1, -1 };
 	if (format == NULL)
 		format = "";
 
-	ast_localtime(&tv, &tm, NULL);
+	ast_localtime(&when, &tm, NULL);
 	snprintf(buf, sizeof(buf), "%s:%s:%04d%02d%02d%02d%02d.%02d-%d-%3d",
 		prefix,
 		format,
@@ -300,9 +300,9 @@
 }
 
 static int say_date_with_format(struct ast_channel *chan, time_t t,
-	const char *ints, const char *lang, const char *format, const char *timezone)
-{
-	return say_date_generic(chan, t, ints, lang, format, timezone, "datetime");
+	const char *ints, const char *lang, const char *format, const char *timezonename)
+{
+	return say_date_generic(chan, t, ints, lang, format, timezonename, "datetime");
 }
 
 static int say_date(struct ast_channel *chan, time_t t, const char *ints, const char *lang)

Modified: team/seanbright/resolve-shadow-warnings/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_queue.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_queue.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_queue.c Sat Apr 19 15:53:18 2008
@@ -1088,7 +1088,7 @@
 	char *timestr, *maxstr, *minstr, *contentdup;
 	struct penalty_rule *rule = NULL, *rule_iter;
 	struct rule_list *rl_iter;
-	int time, inserted = 0;
+	int penaltychangetime, inserted = 0;
 
 	if (!(rule = ast_calloc(1, sizeof(*rule)))) {
 		ast_log(LOG_ERROR, "Cannot allocate memory for penaltychange rule at line %d!\n", linenum);
@@ -1106,13 +1106,13 @@
 	*maxstr++ = '\0';
 	timestr = contentdup;
 
-	if ((time = atoi(timestr)) < 0) {
+	if ((penaltychangetime = atoi(timestr)) < 0) {
 		ast_log(LOG_WARNING, "Improper time parameter specified for penaltychange rule at line %d. Ignoring.\n", linenum);
 		ast_free(rule);
 		return -1;
 	}
 
-	rule->time = time;
+	rule->time = penaltychangetime;
 
 	if ((minstr = strchr(maxstr,',')))
 		*minstr++ = '\0';
@@ -1688,7 +1688,7 @@
 	int res = -1;
 	int pos = 0;
 	int inserted = 0;
-	enum queue_member_status stat;
+	enum queue_member_status status;
 
 	if (!(q = load_realtime_queue(queuename)))
 		return res;
@@ -1697,12 +1697,12 @@
 	ao2_lock(q);
 
 	/* This is our one */
-	stat = get_member_status(q, qe->max_penalty, qe->min_penalty);
-	if (!q->joinempty && (stat == QUEUE_NO_MEMBERS))
+	status = get_member_status(q, qe->max_penalty, qe->min_penalty);
+	if (!q->joinempty && (status == QUEUE_NO_MEMBERS))
 		*reason = QUEUE_JOINEMPTY;
-	else if ((q->joinempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS))
+	else if ((q->joinempty == QUEUE_EMPTY_STRICT) && (status == QUEUE_NO_REACHABLE_MEMBERS || status == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS))
 		*reason = QUEUE_JOINUNAVAIL;
-	else if ((q->joinempty == QUEUE_EMPTY_LOOSE) && (stat == QUEUE_NO_REACHABLE_MEMBERS))
+	else if ((q->joinempty == QUEUE_EMPTY_LOOSE) && (status == QUEUE_NO_REACHABLE_MEMBERS))
 		*reason = QUEUE_JOINUNAVAIL;
 	else if (q->maxlen && (q->count >= q->maxlen))
 		*reason = QUEUE_FULL;
@@ -1934,7 +1934,7 @@
 static void leave_queue(struct queue_ent *qe)
 {
 	struct call_queue *q;
-	struct queue_ent *cur, *prev = NULL;
+	struct queue_ent *current, *prev = NULL;
 	struct penalty_rule *pr_iter;
 	int pos = 0;
 
@@ -1944,8 +1944,8 @@
 	ao2_lock(q);
 
 	prev = NULL;
-	for (cur = q->head; cur; cur = cur->next) {
-		if (cur == qe) {
+	for (current = q->head; current; current = current->next) {
+		if (current == qe) {
 			q->count--;
 
 			/* Take us out of the queue */
@@ -1955,16 +1955,16 @@
 			ast_debug(1, "Queue '%s' Leave, Channel '%s'\n", q->name, qe->chan->name );
 			/* Take us out of the queue */
 			if (prev)
-				prev->next = cur->next;
+				prev->next = current->next;
 			else
-				q->head = cur->next;
+				q->head = current->next;
 			/* Free penalty rules */
 			while ((pr_iter = AST_LIST_REMOVE_HEAD(&qe->qe_rules, list)))
 				ast_free(pr_iter);
 		} else {
 			/* Renumber the people after us in the queue based on a new count */
-			cur->pos = ++pos;
-			prev = cur;
+			current->pos = ++pos;
+			prev = current;
 		}
 	}
 	ao2_unlock(q);
@@ -2803,7 +2803,7 @@
 
 	/* This is the holding pen for callers 2 through maxlen */
 	for (;;) {
-		enum queue_member_status stat;
+		enum queue_member_status status;
 
 		if (is_our_turn(qe))
 			break;
@@ -2814,10 +2814,10 @@
 			break;
 		}
 
-		stat = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty);
+		status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty);
 
 		/* leave the queue if no agents, if enabled */
-		if (qe->parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
+		if (qe->parent->leavewhenempty && (status == QUEUE_NO_MEMBERS)) {
 			*reason = QUEUE_LEAVEEMPTY;
 			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 			leave_queue(qe);
@@ -2825,13 +2825,13 @@
 		}
 
 		/* leave the queue if no reachable agents, if enabled */
-		if ((qe->parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)) {
+		if ((qe->parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (status == QUEUE_NO_REACHABLE_MEMBERS || status == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)) {
 			*reason = QUEUE_LEAVEUNAVAIL;
 			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 			leave_queue(qe);
 			break;
 		}
-		if ((qe->parent->leavewhenempty == QUEUE_EMPTY_LOOSE) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
+		if ((qe->parent->leavewhenempty == QUEUE_EMPTY_LOOSE) && (status == QUEUE_NO_REACHABLE_MEMBERS)) {
 			*reason = QUEUE_LEAVEUNAVAIL;
 			ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 			leave_queue(qe);
@@ -3051,7 +3051,7 @@
 	struct ast_channel *which;
 	struct callattempt *lpeer;
 	struct member *member;
-	struct ast_app *app;
+	struct ast_app *application;
 	int res = 0, bridge = 0;
 	int numbusies = 0;
 	int x=0;
@@ -3538,10 +3538,10 @@
 				res = -1;
 			}
 			
-			app = pbx_findapp("Macro");
-
-			if (app) {
-				res = pbx_exec(qe->chan, app, macroexec);
+			application = pbx_findapp("Macro");
+
+			if (application) {
+				res = pbx_exec(qe->chan, application, macroexec);
 				ast_debug(1, "Macro exited with status %d\n", res);
 				res = 0;
 			} else {
@@ -3574,9 +3574,9 @@
 				res = -1;
 			}
 			
-			app = pbx_findapp("Gosub");
+			application = pbx_findapp("Gosub");
 			
-			if (app) {
+			if (application) {
 				char *gosub_args, *gosub_argstart;
 
 				/* Set where we came from */
@@ -3593,7 +3593,7 @@
 					asprintf(&gosub_args, "%s,s,1", gosubexec);
 				}
 				if (gosub_args) {
-					res = pbx_exec(qe->chan, app, gosub_args);
+					res = pbx_exec(qe->chan, application, gosub_args);
 					ast_pbx_run(qe->chan);
 					free(gosub_args);
 					if (option_debug)
@@ -3615,10 +3615,10 @@
 
 		if (!ast_strlen_zero(agi)) {
 			ast_debug(1, "app_queue: agi=%s.\n", agi);
-			app = pbx_findapp("agi");
-			if (app) {
+			application = pbx_findapp("agi");
+			if (application) {
 				agiexec = ast_strdupa(agi);
-				ret = pbx_exec(qe->chan, app, agiexec);
+				ret = pbx_exec(qe->chan, application, agiexec);
 			} else
 				ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n");
 		}
@@ -4494,7 +4494,7 @@
 		/* they may dial a digit from the queue context; */
 		/* or, they may timeout. */
 
-		enum queue_member_status stat;
+		enum queue_member_status status;
 
 		/* Leave if we have exceeded our queuetimeout */
 		if (qe.expire && (time(NULL) > qe.expire)) {
@@ -4530,7 +4530,7 @@
 			goto stop;
 		}
 
-		stat = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty);
+		status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty);
 
 		/* exit after 'timeout' cycle if 'n' option enabled */
 		if (noption && tries >= qe.parent->membercount) {
@@ -4543,7 +4543,7 @@
 		}
 
 		/* leave the queue if no agents, if enabled */
-		if (qe.parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
+		if (qe.parent->leavewhenempty && (status == QUEUE_NO_MEMBERS)) {
 			record_abandoned(&qe);
 			reason = QUEUE_LEAVEEMPTY;
 			ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
@@ -4552,14 +4552,14 @@
 		}
 
 		/* leave the queue if no reachable agents, if enabled */
-		if ((qe.parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)) {
+		if ((qe.parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (status == QUEUE_NO_REACHABLE_MEMBERS || status == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS)) {
 			record_abandoned(&qe);
 			reason = QUEUE_LEAVEUNAVAIL;
 			ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
 			res = 0;
 			break;
 		}
-		if ((qe.parent->leavewhenempty == QUEUE_EMPTY_LOOSE) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
+		if ((qe.parent->leavewhenempty == QUEUE_EMPTY_LOOSE) && (status == QUEUE_NO_REACHABLE_MEMBERS)) {
 			record_abandoned(&qe);
 			reason = QUEUE_LEAVEUNAVAIL;
 			res = 0;

Modified: team/seanbright/resolve-shadow-warnings/apps/app_record.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_record.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_record.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_record.c Sat Apr 19 15:53:18 2008
@@ -173,7 +173,7 @@
 		);
 		char *tmp2 = ast_strdupa(args.filename);
 		char countstring[15];
-		int i;
+		int idx;
 
 		/* Separate each piece out by the format specifier */
 		AST_NONSTANDARD_APP_ARGS(fname, tmp2, '%');
@@ -182,8 +182,8 @@
 			/* First piece has no leading percent, so it's copied verbatim */
 			ast_copy_string(tmp, fname.piece[0], sizeof(tmp));
 			tmplen = strlen(tmp);
-			for (i = 1; i < fname.argc; i++) {
-				if (fname.piece[i][0] == 'd') {
+			for (idx = 1; idx < fname.argc; idx++) {
+				if (fname.piece[idx][0] == 'd') {
 					/* Substitute the count */
 					snprintf(countstring, sizeof(countstring), "%d", count);
 					ast_copy_string(tmp + tmplen, countstring, sizeof(tmp) - tmplen);
@@ -191,10 +191,10 @@
 				} else if (tmplen + 2 < sizeof(tmp)) {
 					/* Unknown format specifier - just copy it verbatim */
 					tmp[tmplen++] = '%';
-					tmp[tmplen++] = fname.piece[i][0];
+					tmp[tmplen++] = fname.piece[idx][0];
 				}
 				/* Copy the remaining portion of the piece */
-				ast_copy_string(tmp + tmplen, &(fname.piece[i][1]), sizeof(tmp) - tmplen);
+				ast_copy_string(tmp + tmplen, &(fname.piece[idx][1]), sizeof(tmp) - tmplen);
 			}
 			count++;
 		} while (ast_fileexists(tmp, ext, chan->language) > 0);

Modified: team/seanbright/resolve-shadow-warnings/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_rpt.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_rpt.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_rpt.c Sat Apr 19 15:53:18 2008
@@ -1900,7 +1900,7 @@
 	struct rpt_link *l, *m, linkbase;
 	struct ast_channel *mychannel;
 	const char *p, *ct;
-	struct timeval tv;
+	struct timeval now;
 	struct ast_tm localtm;
 #ifdef  APP_RPT_LOCK_DEBUG
 	struct lockthread *t;
@@ -2349,8 +2349,8 @@
 		
 	case STATS_TIME:
 		wait_interval(myrpt, DLY_TELEM, mychannel); /* Wait a little bit */
-		tv = ast_tvnow();
-		ast_localtime(&tv, &localtm, NULL);
+		now = ast_tvnow();
+		ast_localtime(&now, &localtm, NULL);
 		/* Say the phase of the day is before the time */
 		if ((localtm.tm_hour >= 0) && (localtm.tm_hour < 12))
 			p = "rpt/goodmorning";
@@ -2368,7 +2368,7 @@
 			break;
 		}
 		/* Say the time */				
-		res = ast_say_time(mychannel, tv.tv_sec, "", mychannel->language);
+		res = ast_say_time(mychannel, now.tv_sec, "", mychannel->language);
 		if (!res) 
 			res = ast_waitstream(mychannel, "");
 		ast_stopstream(mychannel);		
@@ -3141,7 +3141,7 @@
 
 static int function_autopatchup(struct rpt *myrpt, char *param, char *digitbuf, int command_source, struct rpt_link *mylink)
 {
-	int i, index;
+	int i, idx;
 	char *value = NULL;
 	AST_DECLARE_APP_ARGS(params,
 		AST_APP_ARG(list)[20];
@@ -3174,10 +3174,10 @@
 			char *tmp = ast_strdupa(param);
 			AST_STANDARD_APP_ARGS(params, tmp);
 			for (i = 0; i < params.argc; i++) {
-				index = matchkeyword(params.list[i], &value, keywords);
+				idx = matchkeyword(params.list[i], &value, keywords);
 				if (value)
 					value = skipchars(value, "= ");
-				switch (index) {
+				switch (idx) {
 				case 1: /* context */
 					ast_copy_string(myrpt->patchcontext, value, sizeof(myrpt->patchcontext)) ;
 					break;
@@ -5947,13 +5947,13 @@
 		}	
 
 		if (myrpt->reload) {
-			struct rpt_tele *telem;
+			struct rpt_tele *telemetry;
 
 			rpt_mutex_lock(&myrpt->lock);
-			telem = myrpt->tele.next;
-			while (telem != &myrpt->tele) {
-				ast_softhangup(telem->chan, AST_SOFTHANGUP_DEV);
-				telem = telem->next;
+			telemetry = myrpt->tele.next;
+			while (telemetry != &myrpt->tele) {
+				ast_softhangup(telemetry->chan, AST_SOFTHANGUP_DEV);
+				telemetry = telemetry->next;
 			}
 			myrpt->reload = 0;
 			rpt_mutex_unlock(&myrpt->lock);
@@ -6859,7 +6859,7 @@
 	if (*args.options == 'R') {
 		/* Parts of this section taken from app_parkandannounce */
 		int m, lot, timeout = 0;
-		char tmp[256];
+		char temp[256];
 		char *s;
 		AST_DECLARE_APP_ARGS(optionarg,
 			AST_APP_ARG(template);
@@ -6909,8 +6909,8 @@
 		ast_masq_park_call(chan, NULL, timeout, &lot);
 		ast_verb(3, "Call Parking Called, lot: %d, timeout: %d, context: %s\n", lot, timeout, optionarg.return_context);
 
-		snprintf(tmp, sizeof(tmp), "%d,%s", lot, optionarg.template + 1);
-		rpt_telemetry(myrpt, REV_PATCH, tmp);
+		snprintf(temp, sizeof(temp), "%d,%s", lot, optionarg.template + 1);
+		rpt_telemetry(myrpt, REV_PATCH, temp);
 
 		return 0;
 	}

Modified: team/seanbright/resolve-shadow-warnings/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_sms.c?view=diff&rev=114309&r1=114308&r2=114309
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_sms.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_sms.c Sat Apr 19 15:53:18 2008
@@ -271,8 +271,8 @@
 static char *isodate(time_t t, char *buf, int len)
 {
 	struct ast_tm tm;
-	struct timeval tv = { t, 0 };
-	ast_localtime(&tv, &tm, NULL);
+	struct timeval local = { t, 0 };
+	ast_localtime(&local, &tm, NULL);
 	ast_strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm);
 	return buf;
 }
@@ -506,10 +506,10 @@
 static void packdate(unsigned char *o, time_t w)
 {
 	struct ast_tm t;
-	struct timeval tv = { w, 0 };
+	struct timeval topack = { w, 0 };
 	int z;
 
-	ast_localtime(&tv, &t, NULL);
+	ast_localtime(&topack, &t, NULL);
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__)
 	z = -t.tm_gmtoff / 60 / 15;
 #else
@@ -978,8 +978,8 @@
 		}
 	}
 	if (h->scts.tv_sec) {
-		char buf[30];
-		fprintf(o, "scts=%s\n", isodate(h->scts.tv_sec, buf, sizeof(buf)));
+		char datebuf[30];
+		fprintf(o, "scts=%s\n", isodate(h->scts.tv_sec, datebuf, sizeof(datebuf)));
 	}
 	if (h->pid)
 		fprintf(o, "pid=%d\n", h->pid);
@@ -1111,7 +1111,7 @@
 static void sms_compose2(sms_t *h, int more)
 {
 	struct ast_tm tm;
-	struct timeval tv = h->scts;
+	struct timeval now = h->scts;
 	char stm[9];
 
 	h->omsg[0] = 0x00;       /* set later... */
@@ -1120,7 +1120,7 @@
 	if (h->smsc) {		  /* deliver */
 		h->omsg[0] = 0x11;      /* SMS_DELIVERY */
 		/* Required: 10 11 12 13 14 15 17 (seems they must be ordered!) */
-		ast_localtime(&tv, &tm, NULL);
+		ast_localtime(&now, &tm, NULL);
 		sprintf(stm, "%02d%02d%02d%02d", tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min);     /* Date mmddHHMM */
 		adddata_proto2(h, 0x14, stm, 8);	       /* Date */
 		if (*h->oa == 0)
@@ -1159,14 +1159,14 @@
 	int f, i, sz = 0;
 	int msg, msgsz;
 	struct ast_tm tm;
-	struct timeval tv = { 0, 0 };
+	struct timeval now = { 0, 0 };
 	char debug_buf[MAX_DEBUG_LEN * 3 + 1];
 
 	sz = h->imsg[1] + 2;
 	/* ast_verb(3, "SMS-P2 Frame: %s\n", sms_hexdump(h->imsg, sz, debug_buf)); */
 
 	/* Parse message body (called payload) */
-	tv = h->scts = ast_tvnow();
+	now = h->scts = ast_tvnow();
 	for (f = 4; f < sz; ) {
 		msg = h->imsg[f++];
 		msgsz = h->imsg[f++];
@@ -1181,8 +1181,8 @@
 			h->udl = msgsz;
 			break;
 		case 0x14:      /* Date SCTS */
-			tv = h->scts = ast_tvnow();
-			ast_localtime(&tv, &tm, NULL);
+			now = h->scts = ast_tvnow();
+			ast_localtime(&now, &tm, NULL);
 			tm.tm_mon = ( (h->imsg[f] * 10) + h->imsg[f + 1] ) - 1;
 			tm.tm_mday = ( (h->imsg[f + 2] * 10) + h->imsg[f + 3] );
 			tm.tm_hour = ( (h->imsg[f + 4] * 10) + h->imsg[f + 5] );
@@ -1741,7 +1741,7 @@
 	int res = -1;
 	sms_t h = { 0 };
 	/* argument parsing support */
-	struct ast_flags sms_flags;
+	struct ast_flags flags;
 	char *parse, *sms_opts[OPTION_ARG_ARRAY_SIZE];
 	char *p;
 	AST_DECLARE_APP_ARGS(sms_args,
@@ -1759,7 +1759,7 @@
 	parse = ast_strdupa(data);	/* create a local copy */
 	AST_STANDARD_APP_ARGS(sms_args, parse);
 	if (sms_args.argc > 1)
-		ast_app_parse_options(sms_options, &sms_flags, sms_opts, sms_args.options);
+		ast_app_parse_options(sms_options, &flags, sms_opts, sms_args.options);
 
 	ast_verb(1, "sms argc %d queue <%s> opts <%s> addr <%s> body <%s>\n",
 		sms_args.argc, S_OR(sms_args.queue, ""),
@@ -1787,8 +1787,8 @@
 		if (!isalnum(*p))
 			*p = '-';			  /* make very safe for filenames */
 
-	h.smsc = ast_test_flag(&sms_flags, OPTION_BE_SMSC);
-	h.protocol = ast_test_flag(&sms_flags, OPTION_TWO) ? 2 : 1;
+	h.smsc = ast_test_flag(&flags, OPTION_BE_SMSC);
+	h.protocol = ast_test_flag(&flags, OPTION_TWO) ? 2 : 1;
 	if (!ast_strlen_zero(sms_opts[OPTION_ARG_PAUSE]))
 		h.opause_0 = atoi(sms_opts[OPTION_ARG_PAUSE]);
 	if (h.opause_0 < 25 || h.opause_0 > 2000)
@@ -1797,9 +1797,9 @@
 
 
 	/* the following apply if there is an arg3/4 and apply to the created message file */
-	if (ast_test_flag(&sms_flags, OPTION_SRR))
+	if (ast_test_flag(&flags, OPTION_SRR))
 		h.srr = 1;
-	if (ast_test_flag(&sms_flags, OPTION_DCS))
+	if (ast_test_flag(&flags, OPTION_DCS))
 		h.dcs = 1;
 #if 0	
 		case '1':

[... 524 lines stripped ...]



More information about the asterisk-commits mailing list