[asterisk-commits] seanbright: trunk r137055 - /trunk/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Aug 10 09:45:32 CDT 2008


Author: seanbright
Date: Sun Aug 10 09:45:25 2008
New Revision: 137055

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137055
Log:
More RSW merges.  Everything from apps/ except for the big offenders
app_voicemail and app_queue.

Modified:
    trunk/apps/app_adsiprog.c
    trunk/apps/app_dahdibarge.c
    trunk/apps/app_dahdiscan.c
    trunk/apps/app_dial.c
    trunk/apps/app_directory.c
    trunk/apps/app_disa.c
    trunk/apps/app_festival.c
    trunk/apps/app_forkcdr.c
    trunk/apps/app_macro.c
    trunk/apps/app_meetme.c
    trunk/apps/app_minivm.c
    trunk/apps/app_osplookup.c
    trunk/apps/app_playback.c
    trunk/apps/app_record.c
    trunk/apps/app_rpt.c
    trunk/apps/app_sms.c
    trunk/apps/app_waituntil.c
    trunk/apps/app_while.c

Modified: trunk/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_adsiprog.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_adsiprog.c (original)
+++ trunk/apps/app_adsiprog.c Sun Aug 10 09:45:25 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: trunk/apps/app_dahdibarge.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dahdibarge.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_dahdibarge.c (original)
+++ trunk/apps/app_dahdibarge.c Sun Aug 10 09:45:25 2008
@@ -251,11 +251,11 @@
 
 static int conf_exec(struct ast_channel *chan, void *data)
 {
-	int res=-1;
+	int res = -1;
 	int retrycnt = 0;
 	int confflags = 0;
 	int confno = 0;
-	char confstr[80] = "";
+	char confnostr[80] = "";
 	
 	if (!ast_strlen_zero(data)) {
 		if ((sscanf(data, "DAHDI/%d", &confno) != 1) &&
@@ -270,10 +270,10 @@
 
 	while(!confno && (++retrycnt < 4)) {
 		/* Prompt user for conference number */
-		confstr[0] = '\0';
-		res = ast_app_getdata(chan, "conf-getchannel",confstr, sizeof(confstr) - 1, 0);
+		confnostr[0] = '\0';
+		res = ast_app_getdata(chan, "conf-getchannel",confnostr, sizeof(confnostr) - 1, 0);
 		if (res <0) goto out;
-		if (sscanf(confstr, "%d", &confno) != 1)
+		if (sscanf(confnostr, "%d", &confno) != 1)
 			confno = 0;
 	}
 	if (confno) {

Modified: trunk/apps/app_dahdiscan.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dahdiscan.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_dahdiscan.c (original)
+++ trunk/apps/app_dahdiscan.c Sun Aug 10 09:45:25 2008
@@ -284,7 +284,7 @@
 	int res=-1;
 	int confflags = 0;
 	int confno = 0;
-	char confstr[80] = "", *tmp = NULL;
+	char confnostr[80] = "", *tmp = NULL;
 	struct ast_channel *tempchan = NULL, *lastchan = NULL, *ichan = NULL;
 	struct ast_frame *f;
 	char *desired_group;
@@ -335,12 +335,12 @@
 		}
 		if (tempchan && (!strcmp(tempchan->tech->type, "DAHDI")) && (tempchan != chan)) {
 			ast_verb(3, "DAHDI channel %s is in-use, monitoring...\n", tempchan->name);
-			ast_copy_string(confstr, tempchan->name, sizeof(confstr));
+			ast_copy_string(confnostr, tempchan->name, sizeof(confnostr));
 			ast_channel_unlock(tempchan);
-			if ((tmp = strchr(confstr, '-'))) {
+			if ((tmp = strchr(confnostr, '-'))) {
 				*tmp = '\0';
 			}
-			confno = atoi(strchr(confstr, '/') + 1);
+			confno = atoi(strchr(confnostr, '/') + 1);
 			ast_stopstream(chan);
 			ast_say_number(chan, confno, AST_DIGIT_ANY, chan->language, (char *) NULL);
 			res = conf_run(chan, confno, confflags);

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Sun Aug 10 09:45:25 2008
@@ -2018,7 +2018,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);
@@ -2035,8 +2035,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);
 
@@ -2045,8 +2045,8 @@
 		goto done;
 	}
 
-	if (sleep < 1000)
-		sleep = 10000;
+	if (sleepms < 1000)
+		sleepms = 10000;
 
 	if (!loops)
 		loops = -1; /* run forever */
@@ -2077,10 +2077,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)) {
@@ -2090,11 +2090,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: trunk/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_directory.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_directory.c (original)
+++ trunk/apps/app_directory.c Sun Aug 10 09:45:25 2008
@@ -484,23 +484,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, cat, ext, 0 /* use_first_name */);
+				res = check_match(&item, position, cat, ext, 0 /* use_first_name */);
 			}
 			if (!res && ast_test_flag(&flags, OPT_LISTBYFIRSTNAME)) {
-				res = check_match(&item, pos, cat, ext, 1 /* use_first_name */);
+				res = check_match(&item, position, cat, ext, 1 /* use_first_name */);
 			}
 
 			if (!res)

Modified: trunk/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_disa.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_disa.c (original)
+++ trunk/apps/app_disa.c Sun Aug 10 09:45:25 2008
@@ -318,7 +318,7 @@
 
 	if (k == 3) {
 		int recheck = 0;
-		struct ast_flags flags = { AST_CDR_FLAG_POSTED };
+		struct ast_flags cdr_flags = { 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);
@@ -337,8 +337,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) cdr_flags.flags = 0;
+			ast_cdr_reset(chan->cdr, &cdr_flags);
 			ast_explicit_goto(chan, args.context, exten, 1);
 			return 0;
 		}

Modified: trunk/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_festival.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_festival.c (original)
+++ trunk/apps/app_festival.c Sun Aug 10 09:45:25 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];
-				i++;
-			} else if (festivalcommand[i] == '%' && festivalcommand[i + 1] == 's') {
+				x++;
+			} else if (festivalcommand[x] == '\\') {
+				newfestivalcommand[j++] = festivalcommand[x + 1];
+				x++;
+			} 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: trunk/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_forkcdr.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_forkcdr.c (original)
+++ trunk/apps/app_forkcdr.c Sun Aug 10 09:45:25 2008
@@ -229,9 +229,11 @@
 
 	if (!ast_strlen_zero(arglist.options))
 		ast_app_parse_options(forkcdr_exec_options, &flags, opts, arglist.options);
-	
-	if (!ast_strlen_zero(data))
-		ast_set2_flag(chan->cdr, ast_test_flag(&flags, OPT_KEEPVARS), AST_CDR_FLAG_KEEP_VARS);
+
+	if (!ast_strlen_zero(data)) {
+		int keepvars = ast_test_flag(&flags, OPT_KEEPVARS) ? 1 : 0;
+		ast_set2_flag(chan->cdr, keepvars, AST_CDR_FLAG_KEEP_VARS);
+	}
 	
 	ast_cdr_fork(chan, flags, opts[OPT_ARG_VARSET]);
 

Modified: trunk/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_macro.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Sun Aug 10 09:45:25 2008
@@ -253,12 +253,12 @@
 
 	ast_channel_lock(chan);
 	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);
-		if ((s = pbx_builtin_getvar_helper(chan, varname))) {
-			oldargs[argc] = ast_strdup(s);
+		if ((argp = pbx_builtin_getvar_helper(chan, varname))) {
+			oldargs[argc] = ast_strdup(argp);
 		}
 		pbx_builtin_setvar_helper(chan, varname, cur);
 		argc++;
@@ -329,12 +329,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: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Sun Aug 10 09:45:25 2008
@@ -1536,9 +1536,9 @@
 	int announcement_played = 0;
 	struct timeval now;
 	struct ast_dsp *dsp = NULL;
-	struct ast_app *app;
+	struct ast_app *agi_app;
 	char *agifile;
-	const char *agifiledefault = "conf-background.agi", *tmp;
+	const char *agifiledefault = "conf-background.agi", *tmpvar;
 	char meetmesecs[30] = "";
 	char exitcontext[AST_MAX_CONTEXT] = "";
 	char recordingtmp[AST_MAX_EXTENSION] = "";
@@ -1787,8 +1787,8 @@
 
 	if (confflags & CONFFLAG_EXIT_CONTEXT) {
 		ast_channel_lock(chan);
-		if ((tmp = pbx_builtin_getvar_helper(chan, "MEETME_EXIT_CONTEXT"))) {
-			ast_copy_string(exitcontext, tmp, sizeof(exitcontext));
+		if ((tmpvar = pbx_builtin_getvar_helper(chan, "MEETME_EXIT_CONTEXT"))) {
+			ast_copy_string(exitcontext, tmpvar, sizeof(exitcontext));
 		} else if (!ast_strlen_zero(chan->macrocontext)) {
 			ast_copy_string(exitcontext, chan->macrocontext, sizeof(exitcontext));
 		} else {
@@ -1986,8 +1986,8 @@
 		   or use default filename of conf-background.agi */
 
 		ast_channel_lock(chan);
-		if ((tmp = pbx_builtin_getvar_helper(chan, "MEETME_AGI_BACKGROUND"))) {
-			agifile = ast_strdupa(tmp);
+		if ((tmpvar = pbx_builtin_getvar_helper(chan, "MEETME_AGI_BACKGROUND"))) {
+			agifile = ast_strdupa(tmpvar);
 		} else {
 			agifile = ast_strdupa(agifiledefault);
 		}
@@ -1999,9 +1999,9 @@
 			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) {
-			ret = pbx_exec(chan, app, agifile);
+		agi_app = pbx_findapp("agi");
+		if (agi_app) {
+			ret = pbx_exec(chan, agi_app, agifile);
 		} else {
 			ast_log(LOG_WARNING, "Could not find application (agi)\n");
 			ret = -2;
@@ -2600,27 +2600,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 {
@@ -4059,7 +4059,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;
@@ -4075,7 +4075,7 @@
 			if (sla_check_timed_out_station(ringing_trunk, station))
 				continue;
 
-			if (remove)
+			if (rm)
 				AST_LIST_REMOVE_CURRENT(entry);
 
 			if (trunk_ref)
@@ -4590,7 +4590,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 */
@@ -4614,9 +4614,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: trunk/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_minivm.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Sun Aug 10 09:45:25 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);
 }
 
@@ -1040,18 +1040,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);
@@ -1071,12 +1071,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 {
@@ -1400,11 +1400,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);
 		}
 	}
@@ -2192,9 +2192,8 @@
 /*! \brief Add time zone to memory list */
 static int timezone_add(const char *zonename, const char *config)
 {
-
 	struct minivm_zone *newzone;
-	char *msg_format, *timezone;
+	char *msg_format, *timezone_str;
 
 	newzone = ast_calloc(1, sizeof(*newzone));
 	if (newzone == NULL)
@@ -2207,7 +2206,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);
@@ -2215,7 +2214,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);
@@ -2675,7 +2674,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) {
@@ -2700,12 +2699,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: trunk/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_osplookup.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_osplookup.c (original)
+++ trunk/apps/app_osplookup.c Sun Aug 10 09:45:25 2008
@@ -1193,7 +1193,7 @@
 	int recorded,
 	int cause,
 	time_t start,
-	time_t connect,
+	time_t connect_time,
 	time_t end,
 	unsigned int release)
 {
@@ -1216,11 +1216,11 @@
 
 	error = OSPPTransactionReportUsage(
 				handle,
-				difftime(end, connect),
+				difftime(end, connect_time),
 				start,
 				end,
 				alert,
-				connect,
+				connect_time,
 				isPddInfoPresent,
 				pdd,
 				release,
@@ -1664,7 +1664,7 @@
 	int inhandle = OSP_INVALID_HANDLE;
 	int outhandle = OSP_INVALID_HANDLE;
 	int recorded = 0;
-	time_t start, connect, end;
+	time_t start, connect_time, end;
 	unsigned int release;
 	char buffer[OSP_INTSTR_SIZE];
 	const char* status;
@@ -1713,24 +1713,24 @@
 
 	if (chan->cdr) {
 		start = chan->cdr->start.tv_sec;
-		connect = chan->cdr->answer.tv_sec;
-		if (connect) {
+		connect_time = chan->cdr->answer.tv_sec;
+		if (connect_time) {
 			end = time(NULL);
 		} else {
-			end = connect;
+			end = connect_time;
 		}
 	} else {
 		start = 0;
-		connect = 0;
+		connect_time = 0;
 		end = 0;
 	}
 	ast_debug(1, "OSPFinish: start '%ld'\n", start);
-	ast_debug(1, "OSPFinish: connect '%ld'\n", connect);
+	ast_debug(1, "OSPFinish: connect '%ld'\n", connect_time);
 	ast_debug(1, "OSPFinish: end '%ld'\n", end);
 
 	release = ast_check_hangup(chan) ? 0 : 1;
 
-	if (osp_finish(outhandle, recorded, cause, start, connect, end, release) <= 0) {
+	if (osp_finish(outhandle, recorded, cause, start, connect_time, end, release) <= 0) {
 		ast_debug(1, "OSPFinish: Unable to report usage for outbound call\n");
 	}
 	switch (cause) {
@@ -1740,7 +1740,7 @@
 			cause = AST_CAUSE_NO_ROUTE_DESTINATION;
 			break;
 	}
-	if (osp_finish(inhandle, recorded, cause, start, connect, end, release) <= 0) {
+	if (osp_finish(inhandle, recorded, cause, start, connect_time, end, release) <= 0) {
 		ast_debug(1, "OSPFinish: Unable to report usage for inbound call\n");
 	}
 	snprintf(buffer, sizeof(buffer), "%d", OSP_INVALID_HANDLE);

Modified: trunk/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_playback.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_playback.c (original)
+++ trunk/apps/app_playback.c Sun Aug 10 09:45:25 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: trunk/apps/app_record.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_record.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_record.c (original)
+++ trunk/apps/app_record.c Sun Aug 10 09:45:25 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: trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_rpt.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Sun Aug 10 09:45:25 2008
@@ -2165,12 +2165,11 @@
 #ifdef	NEW_ASTERISK
 static void rpt_localtime( time_t * t, struct ast_tm *lt)
 {
-struct timeval tv;
-
-	tv.tv_sec = *t;
-	tv.tv_usec = 0;
-	ast_localtime(&tv, lt, NULL);
-
+	struct timeval when;
+
+	when.tv_sec = *t;
+	when.tv_usec = 0;
+	ast_localtime(&when, lt, NULL);
 }
 
 #else
@@ -5110,7 +5109,7 @@
 			/* Parts of this section taken from app_parkandannounce */
 			char *tpl_working, *tpl_current;
 			char *tmp[100], *myparm;
-			int looptemp=0,i=0, dres = 0;
+			int looptemp=0,idx=0, dres = 0;
 	
 
 			tpl_working = ast_strdup(mytele->param);
@@ -5123,17 +5122,17 @@
 				tpl_current=strsep(&tpl_working,":");
 			}
 
-			for(i=0; i<looptemp; i++) {
-				if(!strcmp(tmp[i], "PARKED")) {
+			for(idx=0; idx<looptemp; idx++) {
+				if(!strcmp(tmp[idx], "PARKED")) {
 					ast_say_digits(mychannel, atoi(myparm), "", mychannel->language);
-				} else if(!strcmp(tmp[i], "NODE")) {
+				} else if(!strcmp(tmp[idx], "NODE")) {
 					ast_say_digits(mychannel, atoi(myrpt->name), "", mychannel->language);
 				} else {
-					dres = ast_streamfile(mychannel, tmp[i], mychannel->language);
+					dres = ast_streamfile(mychannel, tmp[idx], mychannel->language);
 					if(!dres) {
 						dres = ast_waitstream(mychannel, "");
 					} else {
-						ast_log(LOG_WARNING, "ast_streamfile of %s failed on %s\n", tmp[i], mychannel->name);
+						ast_log(LOG_WARNING, "ast_streamfile of %s failed on %s\n", tmp[idx], mychannel->name);
 						dres = 0;
 					}
 				}
@@ -6144,7 +6143,7 @@
 static int function_autopatchup(struct rpt *myrpt, char *param, char *digitbuf, int command_source, struct rpt_link *mylink)
 {
 	pthread_attr_t attr;
-	int i, index, paramlength;
+	int i, idx, paramlength;
 	char *lparam;
 	char *value = NULL;
 	char *paramlist[20];
@@ -6181,10 +6180,10 @@
 			}
 			paramlength = finddelim(lparam, paramlist, 20); 			
 			for(i = 0; i < paramlength; i++){
-				index = matchkeyword(paramlist[i], &value, keywords);
+				idx = matchkeyword(paramlist[i], &value, keywords);
 				if(value)
 					value = skipchars(value, "= ");
-				switch(index){
+				switch(idx){
 
 					case 1: /* context */
 						strncpy(myrpt->patchcontext, value, MAXPATCHCONTEXT - 1) ;
@@ -6904,10 +6903,10 @@
 	}
 	if (myrpt->p.archivedir)
 	{
-		char str[100];
-
-		sprintf(str,"DTMF,%s,%c",mylink->name,c);
-		donodelog(myrpt,str);
+		char dtmfstr[100];
+
+		sprintf(dtmfstr,"DTMF,%s,%c",mylink->name,c);
+		donodelog(myrpt,dtmfstr);
 	}
 	c = func_xlat(myrpt,c,&myrpt->p.outxlat);
 	if (!c) return;
@@ -7402,7 +7401,7 @@
 static int serial_remote_io(struct rpt *myrpt, unsigned char *txbuf, int txbytes, 
 	unsigned char *rxbuf, int rxmaxbytes, int asciiflag)
 {
-	int i,j,index,oldmode,olddata;
+	int i,j,idx,oldmode,olddata;
 	struct dahdi_radio_param prm;
 	char c;
 
@@ -7477,7 +7476,7 @@
                 *rxbuf = 0;
                 memcpy(rxbuf,prm.buf,prm.index);
         }
-	index = prm.index;
+	idx = prm.index;
         prm.radpar = DAHDI_RADPAR_REMMODE;
         prm.data = DAHDI_RADPAR_REM_NONE;
 	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
@@ -7492,7 +7491,7 @@
 	prm.radpar = DAHDI_RADPAR_UIODATA;
 	prm.data = olddata;
 	if (ioctl(myrpt->dahdirxchannel->fds[0],DAHDI_RADIO_SETPARAM,&prm) == -1) return -1;
-        return(index);
+        return(idx);
 }
 
 static int civ_cmd(struct rpt *myrpt,unsigned char *cmd, int cmdlen)
@@ -10264,10 +10263,10 @@
 	if (strcmp(dest,myrpt->name)) return 0;
 	if (myrpt->p.archivedir)
 	{
-		char str[100];
-
-		sprintf(str,"DTMF,%c",c);
-		donodelog(myrpt,str);
+		char dtmfstr[100];
+
+		sprintf(dtmfstr,"DTMF,%c",c);
+		donodelog(myrpt,dtmfstr);
 	}
 	c = func_xlat(myrpt,c,&myrpt->p.outxlat);
 	if (!c) return(0);
@@ -11228,14 +11227,14 @@
 
 		if (myrpt->reload)
 		{
-			struct rpt_tele *telem;
+			struct rpt_tele *inner_telem;
 
 			rpt_mutex_lock(&myrpt->lock);
-			telem = myrpt->tele.next;
-			while(telem != &myrpt->tele)
-			{
-				ast_softhangup(telem->chan,AST_SOFTHANGUP_DEV);
-				telem = telem->next;
+			inner_telem = myrpt->tele.next;
+			while(inner_telem != &myrpt->tele)
+			{
+				ast_softhangup(inner_telem->chan,AST_SOFTHANGUP_DEV);
+				inner_telem = inner_telem->next;
 			}
 			myrpt->reload = 0;
 			rpt_mutex_unlock(&myrpt->lock);
@@ -11901,16 +11900,16 @@
 		if (myrpt->keyposttimer <= 0)
 		{
 			char str[100];
-			int n = 0;
+			int diff = 0;
 			time_t now;
 
 			myrpt->keyposttimer = KEYPOSTTIME;
 			time(&now);
 			if (myrpt->lastkeyedtime)
 			{
-				n = (int)(now - myrpt->lastkeyedtime);
-			}
-			sprintf(str,"keyed=%d&keytime=%d",myrpt->keyed,n);
+				diff = (int)(now - myrpt->lastkeyedtime);
+			}
+			sprintf(str,"keyed=%d&keytime=%d",myrpt->keyed,diff);
 			rpt_mutex_unlock(&myrpt->lock);
 			statpost(myrpt,str);
 			rpt_mutex_lock(&myrpt->lock);
@@ -12163,41 +12162,41 @@
 					}
 					if (f->datalen && f->data.ptr)
 					{
-						char *val, busy = 0;
+						char busy = 0;
 
 						if (debug) ast_log(LOG_NOTICE,"Got PL %s on node %s\n",(char *)f->data.ptr,myrpt->name);
 						// ctcss code autopatch initiate
 						if (strstr((char *)f->data.ptr,"/M/")&& !myrpt->macropatch)
 						{
-						    char val[16];
-							strcat(val,"*6");
+						    char value[16];
+							strcat(value,"*6");
 							myrpt->macropatch=1;
 							rpt_mutex_lock(&myrpt->lock);
-							if ((MAXMACRO - strlen(myrpt->macrobuf)) < strlen(val)){
+							if ((MAXMACRO - strlen(myrpt->macrobuf)) < strlen(value)){
 								rpt_mutex_unlock(&myrpt->lock);
 								busy=1;
 							}
 							if(!busy){
 								myrpt->macrotimer = MACROTIME;
-								strncat(myrpt->macrobuf,val,MAXMACRO - 1);
+								strncat(myrpt->macrobuf,value,MAXMACRO - 1);
 								if (!busy) strcpy(myrpt->lasttone,(char*)f->data.ptr);
 							}
 							rpt_mutex_unlock(&myrpt->lock);
 						}
 						else if (strcmp((char *)f->data.ptr,myrpt->lasttone))
 						{
-							val = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->p.tonemacro, (char *)f->data.ptr);
-							if (val) 
+							char *value = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->p.tonemacro, (char *)f->data.ptr);
+							if (value)
 							{
-								if (debug) ast_log(LOG_NOTICE,"Tone %s doing %s on node %s\n",(char *) f->data.ptr,val,myrpt->name);
+								if (debug) ast_log(LOG_NOTICE,"Tone %s doing %s on node %s\n",(char *) f->data.ptr,value,myrpt->name);
 								rpt_mutex_lock(&myrpt->lock);
-								if ((MAXMACRO - strlen(myrpt->macrobuf)) < strlen(val)){
+								if ((MAXMACRO - strlen(myrpt->macrobuf)) < strlen(value)){
 									rpt_mutex_unlock(&myrpt->lock);
 									busy=1;
 								}
 								if(!busy){
 									myrpt->macrotimer = MACROTIME;
-									strncat(myrpt->macrobuf,val,MAXMACRO - 1);
+									strncat(myrpt->macrobuf,value,MAXMACRO - 1);
 								}
 								rpt_mutex_unlock(&myrpt->lock);
 							}
@@ -12281,7 +12280,7 @@
 			}
 			if (f->frametype == AST_FRAME_VOICE)
 			{
-				struct ast_frame *f1;
+				struct ast_frame *vframe;
 
 				if (myrpt->p.duplex < 2)
 				{
@@ -12290,22 +12289,22 @@
 						if ((!myfirst) && myrpt->callmode)
 						{
 						    x = 0;
-						    AST_LIST_TRAVERSE(&myrpt->txq, f1,
+						    AST_LIST_TRAVERSE(&myrpt->txq, vframe,
 							frame_list) x++;
 						    for(;x < myrpt->p.simplexpatchdelay; x++)
 						    {
-								f1 = ast_frdup(f);
-								memset(f1->data.ptr,0,f1->datalen);
-								AST_LIST_INSERT_TAIL(&myrpt->txq,f1,frame_list);
+								vframe = ast_frdup(f);
+								memset(vframe->data.ptr,0,vframe->datalen);
+								AST_LIST_INSERT_TAIL(&myrpt->txq,vframe,frame_list);
 						    }
 						    myfirst = 1;
 						}
-						f1 = ast_frdup(f);
+						vframe = ast_frdup(f);
 						AST_LIST_INSERT_TAIL(&myrpt->txq,
-							f1,frame_list);
+							vframe,frame_list);
 					} else myfirst = 0;
 					x = 0;
-					AST_LIST_TRAVERSE(&myrpt->txq, f1,
+					AST_LIST_TRAVERSE(&myrpt->txq, vframe,
 						frame_list) x++;
 					if (!x)
 					{
@@ -12320,8 +12319,8 @@
 				}
 				else
 				{
-					while((f1 = AST_LIST_REMOVE_HEAD(&myrpt->txq,
-						frame_list))) ast_frfree(f1);
+					while((vframe = AST_LIST_REMOVE_HEAD(&myrpt->txq,
+						frame_list))) ast_frfree(vframe);
 				}
 				ast_write(myrpt->txchannel,f);
 			}
@@ -13192,7 +13191,6 @@
 
 	if(options && *options == 'q')
 	{
-		int res=0;
 	 	char buf2[128];
 
 		if(myrpt->keyed)
@@ -13226,8 +13224,7 @@
 		snprintf(buf2,sizeof(buf2),"%s=%s", "RPT_STAT_LASTTONE", myrpt->lasttone);
 		pbx_builtin_setvar(chan, buf2);
 
-		res=priority_jump(myrpt,chan);
-		return res;
+		return priority_jump(myrpt,chan);
 	}
 
 	if(options && *options == 'o')
@@ -13307,8 +13304,8 @@
 	{
 		/* Parts of this section taken from app_parkandannounce */
 		char *return_context;
-		int l, m, lot, timeout = 0;
-		char tmp[256],*template;
+		int length, m, lot, timeout = 0;
+		char buffer[256],*template;
 		char *working, *context, *exten, *priority;
 		char *s,*orig_s;
 
@@ -13332,14 +13329,14 @@
 			if (!phone_mode) send_newkey(chan);
 		}
 
-		l=strlen(options)+2;
-		orig_s=ast_malloc(l);
+		length=strlen(options)+2;
+		orig_s=ast_malloc(length);
 		if(!orig_s) {
 			ast_log(LOG_WARNING, "Out of memory\n");
 			return -1;
 		}
 		s=orig_s;
-		strncpy(s,options,l);
+		strncpy(s,options,length);
 
 		template=strsep(&s,"|");
 		if(!template) {
@@ -13408,9 +13405,9 @@
 
 		if (option_verbose > 2) ast_verbose( VERBOSE_PREFIX_3 "Call Parking Called, lot: %d, timeout: %d, context: %s\n", lot, timeout, return_context);
 
-		snprintf(tmp,sizeof(tmp) - 1,"%d,%s",lot,template + 1);
-
-		rpt_telemetry(myrpt,REV_PATCH,tmp);
+		snprintf(buffer, sizeof(buffer) - 1, "%d,%s", lot, template + 1);
+
+		rpt_telemetry(myrpt,REV_PATCH,buffer);
 
 		ast_free(orig_s);
 
@@ -14982,7 +14979,7 @@
 
 static int manager_rpt_status(struct mansession *s, const struct message *m)
 {
-	int i,res,len,index;
+	int i,res,len,idx;
 	int uptime,hours,minutes;
 	time_t now;
 	const char *cmd = astman_get_header(m, "Command");
@@ -15022,9 +15019,9 @@
 		return 0;
 	}
 	else
-		index = mct[i].index;
-
-	switch(index){ /* Use the index to go to the correct command */
+		idx = mct[i].index;
+
+	switch(idx){ /* Use the index to go to the correct command */
 
 		case MGRCMD_RPTSTAT:
 			/* Return Nodes: and a comma separated list of nodes */

Modified: trunk/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sms.c?view=diff&rev=137055&r1=137054&r2=137055
==============================================================================
--- trunk/apps/app_sms.c (original)
+++ trunk/apps/app_sms.c Sun Aug 10 09:45:25 2008
@@ -272,8 +272,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;
 }
@@ -507,10 +507,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
@@ -980,8 +980,8 @@
 		}
 	}

[... 150 lines stripped ...]



More information about the asterisk-commits mailing list