[asterisk-commits] seanbright: trunk r137089 - in /trunk: apps/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Aug 10 15:23:51 CDT 2008


Author: seanbright
Date: Sun Aug 10 15:23:50 2008
New Revision: 137089

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137089
Log:
Another batch of files from RSW.  The remaining apps and a few more
files from main/

Modified:
    trunk/apps/app_queue.c
    trunk/apps/app_voicemail.c
    trunk/main/asterisk.c
    trunk/main/channel.c
    trunk/main/cli.c
    trunk/main/frame.c
    trunk/main/indications.c
    trunk/main/logger.c
    trunk/main/pbx.c
    trunk/main/rtp.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Sun Aug 10 15:23:50 2008
@@ -1056,7 +1056,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);
@@ -1074,13 +1074,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';
@@ -1684,7 +1684,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;
@@ -1693,12 +1693,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 || stat == QUEUE_NO_MEMBERS))
+	else if ((q->joinempty == QUEUE_EMPTY_STRICT) && (status == QUEUE_NO_REACHABLE_MEMBERS || status == QUEUE_NO_UNPAUSED_REACHABLE_MEMBERS || status == QUEUE_NO_MEMBERS))
 		*reason = QUEUE_JOINUNAVAIL;
-	else if ((q->joinempty == QUEUE_EMPTY_LOOSE) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_MEMBERS))
+	else if ((q->joinempty == QUEUE_EMPTY_LOOSE) && (status == QUEUE_NO_REACHABLE_MEMBERS || status == QUEUE_NO_MEMBERS))
 		*reason = QUEUE_JOINUNAVAIL;
 	else if (q->maxlen && (q->count >= q->maxlen))
 		*reason = QUEUE_FULL;
@@ -1959,7 +1959,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;
 
@@ -1969,8 +1969,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 */
@@ -1980,16 +1980,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);
@@ -2849,7 +2849,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;
@@ -2860,10 +2860,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);
@@ -2871,13 +2871,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);
@@ -3204,7 +3204,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;
@@ -3715,10 +3715,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 {
@@ -3751,9 +3751,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 */
@@ -3770,7 +3770,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)
@@ -3792,10 +3792,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");
 		}
@@ -4704,7 +4704,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)) {
@@ -4749,7 +4749,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) {
@@ -4762,7 +4762,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));
@@ -4771,14 +4771,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: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sun Aug 10 15:23:50 2008
@@ -1716,12 +1716,12 @@
 	int tempcopy = 0;
 	STRING str;
 	int ret; /* for better error checking */
-	char *imapflags = NIL;
+	char *imap_flags = NIL;
 
 	/* Set urgent flag for IMAP message */
 	if (!ast_strlen_zero(flag) && !strcmp(flag, "Urgent")) {
 		ast_debug(3, "Setting message flag \\\\FLAGGED.\n");
-		imapflags="\\FLAGGED";
+		imap_flags="\\FLAGGED";
 	}
 	
 	/* Attach only the first format */
@@ -1790,7 +1790,7 @@
 	ret = init_mailstream(vms, NEW_FOLDER);
 	if (ret == 0) {
 		imap_mailbox_name(mailbox, sizeof(mailbox), vms, NEW_FOLDER, 1);
-		if(!mail_append_full(vms->mailstream, mailbox, imapflags, NIL, &str))
+		if(!mail_append_full(vms->mailstream, mailbox, imap_flags, NIL, &str))
 			ast_log(LOG_ERROR, "Error while sending the message to %s\n", mailbox);
 		fclose(p);
 		unlink(tmp);
@@ -1905,13 +1905,13 @@
 
 static int has_voicemail(const char *mailbox, const char *folder)
 {
-	char tmp[256], *tmp2, *mbox, *context;
+	char tmp[256], *tmp2, *box, *context;
 	ast_copy_string(tmp, mailbox, sizeof(tmp));
 	tmp2 = tmp;
 	if (strchr(tmp2, ',')) {
-		while ((mbox = strsep(&tmp2, ","))) {
-			if (!ast_strlen_zero(mbox)) {
-				if (has_voicemail(mbox, folder))
+		while ((box = strsep(&tmp2, ","))) {
+			if (!ast_strlen_zero(box)) {
+				if (has_voicemail(box, folder))
 					return 1;
 			}
 		}
@@ -2241,9 +2241,9 @@
 }
 
 
-void mm_lsub(MAILSTREAM * stream, int delimiter, char *mailbox, long attributes)
-{
-	ast_debug(5, "Delimiter set to %c and mailbox %s\n",delimiter, mailbox);
+void mm_lsub(MAILSTREAM * stream, int delim, char *mailbox, long attributes)
+{
+	ast_debug(5, "Delimiter set to %c and mailbox %s\n",delim, mailbox);
 	if (attributes & LATT_NOINFERIORS)
 		ast_debug(5, "no inferiors\n");
 	if (attributes & LATT_NOSELECT)
@@ -4338,13 +4338,13 @@
  */
 static int has_voicemail(const char *mailbox, const char *folder)
 {
-	char tmp[256], *tmp2 = tmp, *mbox, *context;
+	char tmp[256], *tmp2 = tmp, *box, *context;
 	ast_copy_string(tmp, mailbox, sizeof(tmp));
-	while ((context = mbox = strsep(&tmp2, ","))) {
+	while ((context = box = strsep(&tmp2, ","))) {
 		strsep(&context, "@");
 		if (ast_strlen_zero(context))
 			context = "default";
-		if (messagecount(context, mbox, folder))
+		if (messagecount(context, box, folder))
 			return 1;
 	}
 	return 0;
@@ -4465,14 +4465,14 @@
  */
 static int has_voicemail(const char *mailbox, const char *folder)
 {
-	char tmp[256], *tmp2 = tmp, *mbox, *context;
+	char tmp[256], *tmp2 = tmp, *box, *context;
 	ast_copy_string(tmp, mailbox, sizeof(tmp));
-	while ((mbox = strsep(&tmp2, ","))) {
-		if ((context = strchr(mbox, '@')))
+	while ((box = strsep(&tmp2, ","))) {
+		if ((context = strchr(box, '@')))
 			*context++ = '\0';
 		else
 			context = "default";
-		if (__has_voicemail(context, mbox, folder, 1))
+		if (__has_voicemail(context, box, folder, 1))
 			return 1;
 	}
 	return 0;
@@ -5020,15 +5020,15 @@
 					/* Are there to be more recipients of this message? */
 					while (tmpptr) {
 						struct ast_vm_user recipu, *recip;
-						char *exten, *context;
+						char *exten, *cntx;
 					
 						exten = strsep(&tmpptr, "&");
-						context = strchr(exten, '@');
-						if (context) {
-							*context = '\0';
-							context++;
+						cntx = strchr(exten, '@');
+						if (cntx) {
+							*cntx = '\0';
+							cntx++;
 						}
-						if ((recip = find_user(&recipu, context, exten))) {
+						if ((recip = find_user(&recipu, cntx, exten))) {
 							copy_message(chan, vmu, 0, msgnum, duration, recip, fmt, dir, flag);
 							free_user(recip);
 						}
@@ -5719,7 +5719,7 @@
  * This is invoked from forward_message() when performing a forward operation (option 8 from main menu).
  * \return zero on success, -1 on error.
  */
-static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, char *curdir, int curmsg, char *vmfmts,
+static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, char *curdir, int curmsg, char *vm_fmts,
 			char *context, signed char record_gain, long *duration, struct vm_state *vms, char *flag)
 {
 #ifdef IMAP_STORAGE
@@ -5761,7 +5761,7 @@
 			strncat(vms->introfn, "intro", sizeof(vms->introfn));
 			res = ast_play_and_wait(chan, INTRO);
 			res = ast_play_and_wait(chan, "beep");
-			res = play_record_review(chan, NULL, vms->introfn, vmu->maxsecs, vmfmts, 1, vmu, (int *)duration, NULL, record_gain, vms, flag);
+			res = play_record_review(chan, NULL, vms->introfn, vmu->maxsecs, vm_fmts, 1, vmu, (int *)duration, NULL, record_gain, vms, flag);
 			cmd = 't';
 #else
 
@@ -5788,7 +5788,7 @@
 			if (record_gain)
 				ast_channel_setoption(chan, AST_OPTION_RXGAIN, &record_gain, sizeof(record_gain), 0);
 
-			cmd = ast_play_and_prepend(chan, NULL, msgfile, 0, vmfmts, &prepend_duration, 1, silencethreshold, maxsilence);
+			cmd = ast_play_and_prepend(chan, NULL, msgfile, 0, vm_fmts, &prepend_duration, 1, silencethreshold, maxsilence);
 			if (record_gain)
 				ast_channel_setoption(chan, AST_OPTION_RXGAIN, &zero_gain, sizeof(zero_gain), 0);
 
@@ -5799,12 +5799,12 @@
 			if (prepend_duration) {
 				struct ast_category *msg_cat;
 				/* need enough space for a maximum-length message duration */
-				char duration_str[12];
+				char duration_buf[12];
 
 				*duration += prepend_duration;
 				msg_cat = ast_category_get(msg_cfg, "message");
-				snprintf(duration_str, 11, "%ld", *duration);
-				if (!ast_variable_update(msg_cat, "duration", duration_str, NULL, 0)) {
+				snprintf(duration_buf, 11, "%ld", *duration);
+				if (!ast_variable_update(msg_cat, "duration", duration_buf, NULL, 0)) {
 					config_text_file_save(textfile, msg_cfg, "app_voicemail");
 					STORE(curdir, vmu->mailbox, context, curmsg, chan, vmu, vmfmts, prepend_duration, vms, NULL);
 				}
@@ -5849,13 +5849,13 @@
 	return cmd;
 }
 
-static void queue_mwi_event(const char *mbox, int urgent, int new, int old)
+static void queue_mwi_event(const char *box, int urgent, int new, int old)
 {
 	struct ast_event *event;
 	char *mailbox, *context;
 
 	/* Strip off @default */
-	context = mailbox = ast_strdupa(mbox);
+	context = mailbox = ast_strdupa(box);
 	strsep(&context, "@");
 	if (ast_strlen_zero(context))
 		context = "default";
@@ -6053,11 +6053,11 @@
 			char old_context[sizeof(chan->context)];
 			char old_exten[sizeof(chan->exten)];
 			int old_priority;
-			struct ast_app* app;
+			struct ast_app* directory_app;
 
 			
-			app = pbx_findapp("Directory");
-			if (app) {
+			directory_app = pbx_findapp("Directory");
+			if (directory_app) {
 				char vmcontext[256];
 				/* make backup copies */
 				memcpy(old_context, chan->context, sizeof(chan->context));
@@ -6066,7 +6066,7 @@
 				
 				/* call the the Directory, changes the channel */
 				snprintf(vmcontext, sizeof(vmcontext), "%s||v", context ? context : "default");
-				res = pbx_exec(chan, app, vmcontext);
+				res = pbx_exec(chan, directory_app, vmcontext);
 				
 				ast_copy_string(username, chan->exten, sizeof(username));
 				
@@ -6757,68 +6757,68 @@
  * syntax for the above three categories which is more elegant. 
  */
 
-static int vm_play_folder_name_gr(struct ast_channel *chan, char *mbox)
+static int vm_play_folder_name_gr(struct ast_channel *chan, char *box)
 {
 	int cmd;
 	char *buf;
 
-	buf = alloca(strlen(mbox)+2); 
-	strcpy(buf, mbox);
+	buf = alloca(strlen(box)+2); 
+	strcpy(buf, box);
 	strcat(buf,"s");
 
-	if (!strcasecmp(mbox, "vm-INBOX") || !strcasecmp(mbox, "vm-Old")){
+	if (!strcasecmp(box, "vm-INBOX") || !strcasecmp(box, "vm-Old")){
 		cmd = ast_play_and_wait(chan, buf); /* "NEA / PALIA" */
 		return cmd ? cmd : ast_play_and_wait(chan, "vm-messages"); /* "messages" -> "MYNHMATA" */
 	} else {
 		cmd = ast_play_and_wait(chan, "vm-messages"); /* "messages" -> "MYNHMATA" */
-		return cmd ? cmd : ast_play_and_wait(chan, mbox); /* friends/family/work... -> "FILWN"/"OIKOGENIAS"/"DOULEIAS"*/
-	}
-}
-
-static int vm_play_folder_name_pl(struct ast_channel *chan, char *mbox)
+		return cmd ? cmd : ast_play_and_wait(chan, box); /* friends/family/work... -> "FILWN"/"OIKOGENIAS"/"DOULEIAS"*/
+	}
+}
+
+static int vm_play_folder_name_pl(struct ast_channel *chan, char *box)
 {
 	int cmd;
 
-	if (!strcasecmp(mbox, "vm-INBOX") || !strcasecmp(mbox, "vm-Old")) {
-		if (!strcasecmp(mbox, "vm-INBOX"))
+	if (!strcasecmp(box, "vm-INBOX") || !strcasecmp(box, "vm-Old")) {
+		if (!strcasecmp(box, "vm-INBOX"))
 			cmd = ast_play_and_wait(chan, "vm-new-e");
 		else
 			cmd = ast_play_and_wait(chan, "vm-old-e");
 		return cmd ? cmd : ast_play_and_wait(chan, "vm-messages");
 	} else {
 		cmd = ast_play_and_wait(chan, "vm-messages");
-		return cmd ? cmd : ast_play_and_wait(chan, mbox);
-	}
-}
-
-static int vm_play_folder_name_ua(struct ast_channel *chan, char *mbox)
+		return cmd ? cmd : ast_play_and_wait(chan, box);
+	}
+}
+
+static int vm_play_folder_name_ua(struct ast_channel *chan, char *box)
 {
 	int cmd;
 
-	if (!strcasecmp(mbox, "vm-Family") || !strcasecmp(mbox, "vm-Friends") || !strcasecmp(mbox, "vm-Work")){
+	if (!strcasecmp(box, "vm-Family") || !strcasecmp(box, "vm-Friends") || !strcasecmp(box, "vm-Work")){
 		cmd = ast_play_and_wait(chan, "vm-messages");
-		return cmd ? cmd : ast_play_and_wait(chan, mbox);
+		return cmd ? cmd : ast_play_and_wait(chan, box);
 	} else {
-		cmd = ast_play_and_wait(chan, mbox);
+		cmd = ast_play_and_wait(chan, box);
 		return cmd ? cmd : ast_play_and_wait(chan, "vm-messages");
 	}
 }
 
-static int vm_play_folder_name(struct ast_channel *chan, char *mbox)
+static int vm_play_folder_name(struct ast_channel *chan, char *box)
 {
 	int cmd;
 
 	if (!strcasecmp(chan->language, "it") || !strcasecmp(chan->language, "es") || !strcasecmp(chan->language, "pt") || !strcasecmp(chan->language, "pt_BR")) { /* Italian, Spanish, French or Portuguese syntax */
 		cmd = ast_play_and_wait(chan, "vm-messages"); /* "messages */
-		return cmd ? cmd : ast_play_and_wait(chan, mbox);
+		return cmd ? cmd : ast_play_and_wait(chan, box);
 	} else if (!strcasecmp(chan->language, "gr")){
-		return vm_play_folder_name_gr(chan, mbox);
+		return vm_play_folder_name_gr(chan, box);
 	} else if (!strcasecmp(chan->language, "pl")){
-		return vm_play_folder_name_pl(chan, mbox);
+		return vm_play_folder_name_pl(chan, box);
 	} else if (!strcasecmp(chan->language, "ua")){  /* Ukrainian syntax */
-		return vm_play_folder_name_ua(chan, mbox);
+		return vm_play_folder_name_ua(chan, box);
 	} else {  /* Default English */
-		cmd = ast_play_and_wait(chan, mbox);
+		cmd = ast_play_and_wait(chan, box);
 		return cmd ? cmd : ast_play_and_wait(chan, "vm-messages"); /* "messages */
 	}
 }
@@ -8397,7 +8397,7 @@
 
 static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_size,
 			struct ast_vm_user *res_vmu, const char *context, const char *prefix,
-			int skipuser, int maxlogins, int silent)
+			int skipuser, int max_logins, int silent)
 {
 	int useadsi=0, valid=0, logretries=0;
 	char password[AST_MAX_EXTENSION]="", *passptr;
@@ -8414,7 +8414,7 @@
 	
 	/* Authenticate them and get their mailbox/password */
 	
-	while (!valid && (logretries < maxlogins)) {
+	while (!valid && (logretries < max_logins)) {
 		/* Prompt for, and read in the username */
 		if (!skipuser && ast_readstring(chan, mailbox, mailbox_size - 1, 2000, 10000, "#") < 0) {
 			ast_log(AST_LOG_WARNING, "Couldn't read username\n");
@@ -8467,7 +8467,7 @@
 		}
 		logretries++;
 		if (!valid) {
-			if (skipuser || logretries >= maxlogins) {
+			if (skipuser || logretries >= max_logins) {
 				if (ast_streamfile(chan, "vm-incorrect", chan->language)) {
 					ast_log(AST_LOG_WARNING, "Unable to stream incorrect message\n");
 					return -1;
@@ -8484,7 +8484,7 @@
 				return -1;
 		}
 	}
-	if (!valid && (logretries >= maxlogins)) {
+	if (!valid && (logretries >= max_logins)) {
 		ast_stopstream(chan);
 		ast_play_and_wait(chan, "vm-goodbye");
 		return -1;
@@ -9230,13 +9230,13 @@
 			}
 		}
 	} else {
-		char tmp[256];
-		res = ast_app_getdata(chan, "vm-whichbox", tmp, sizeof(tmp) - 1, 0);
+		char temp[256];
+		res = ast_app_getdata(chan, "vm-whichbox", temp, sizeof(temp) - 1, 0);
 		if (res < 0)
 			return res;
-		if (ast_strlen_zero(tmp))
+		if (ast_strlen_zero(temp))
 			return 0;
-		args.argv0 = ast_strdupa(tmp);
+		args.argv0 = ast_strdupa(temp);
 	}
 
 	res = leave_voicemail(chan, args.argv0, &leave_options);
@@ -9250,14 +9250,14 @@
 	return res;
 }
 
-static struct ast_vm_user *find_or_create(const char *context, const char *mbox)
+static struct ast_vm_user *find_or_create(const char *context, const char *box)
 {
 	struct ast_vm_user *vmu;
 
 	AST_LIST_TRAVERSE(&users, vmu, list) {
-		if (ast_test_flag((&globalflags), VM_SEARCH) && !strcasecmp(mbox, vmu->mailbox))
+		if (ast_test_flag((&globalflags), VM_SEARCH) && !strcasecmp(box, vmu->mailbox))
 			break;
-		if (context && (!strcasecmp(context, vmu->context)) && (!strcasecmp(mbox, vmu->mailbox)))
+		if (context && (!strcasecmp(context, vmu->context)) && (!strcasecmp(box, vmu->mailbox)))
 			break;
 	}
 
@@ -9268,14 +9268,14 @@
 		return NULL;
 	
 	ast_copy_string(vmu->context, context, sizeof(vmu->context));
-	ast_copy_string(vmu->mailbox, mbox, sizeof(vmu->mailbox));
+	ast_copy_string(vmu->mailbox, box, sizeof(vmu->mailbox));
 
 	AST_LIST_INSERT_TAIL(&users, vmu, list);
 	
 	return vmu;
 }
 
-static int append_mailbox(const char *context, const char *mbox, const char *data)
+static int append_mailbox(const char *context, const char *box, const char *data)
 {
 	/* Assumes lock is already held */
 	char *tmp;
@@ -9287,7 +9287,7 @@
 
 	tmp = ast_strdupa(data);
 
-	if (!(vmu = find_or_create(context, mbox)))
+	if (!(vmu = find_or_create(context, box)))
 		return -1;
 	
 	populate_defaults(vmu);
@@ -9304,8 +9304,8 @@
 	if (stringp && (s = strsep(&stringp, ","))) 
 		apply_options(vmu, s);
 
-	mailbox_full = alloca(strlen(mbox) + strlen(context) + 1);
-	strcpy(mailbox_full, mbox);
+	mailbox_full = alloca(strlen(box) + strlen(context) + 1);
+	strcpy(mailbox_full, box);
 	strcat(mailbox_full, "@");
 	strcat(mailbox_full, context);
 
@@ -9642,11 +9642,11 @@
 {
 	while (poll_thread_run) {
 		struct timespec ts = { 0, };
-		struct timeval tv;
-
-		tv = ast_tvadd(ast_tvnow(), ast_samp2tv(poll_freq, 1));
-		ts.tv_sec = tv.tv_sec;
-		ts.tv_nsec = tv.tv_usec * 1000;
+		struct timeval wait;
+
+		wait = ast_tvadd(ast_tvnow(), ast_samp2tv(poll_freq, 1));
+		ts.tv_sec = wait.tv_sec;
+		ts.tv_nsec = wait.tv_usec * 1000;
 
 		ast_mutex_lock(&poll_lock);
 		ast_cond_timedwait(&poll_cond, &poll_lock, &ts);
@@ -9906,11 +9906,11 @@
 /*! \brief Free the users structure. */
 static void free_vm_users(void) 
 {
-	struct ast_vm_user *cur;
+	struct ast_vm_user *current;
 	AST_LIST_LOCK(&users);
-	while ((cur = AST_LIST_REMOVE_HEAD(&users, list))) {
-		ast_set_flag(cur, VM_ALLOCED);
-		free_user(cur);
+	while ((current = AST_LIST_REMOVE_HEAD(&users, list))) {
+		ast_set_flag(current, VM_ALLOCED);
+		free_user(current);
 	}
 	AST_LIST_UNLOCK(&users);
 }
@@ -9927,7 +9927,7 @@
 
 static int load_config(int reload)
 {
-	struct ast_vm_user *cur;
+	struct ast_vm_user *current;
 	struct ast_config *cfg, *ucfg;
 	char *cat;
 	struct ast_variable *var;
@@ -10423,10 +10423,10 @@
 			for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
 				if (!ast_true(ast_config_option(ucfg, cat, "hasvoicemail")))
 					continue;
-				if ((cur = find_or_create(userscontext, cat))) {
-					populate_defaults(cur);
-					apply_options_full(cur, ast_variable_browse(ucfg, cat));
-					ast_copy_string(cur->context, userscontext, sizeof(cur->context));
+				if ((current = find_or_create(userscontext, cat))) {
+					populate_defaults(current);
+					apply_options_full(current, ast_variable_browse(ucfg, cat));
+					ast_copy_string(current->context, userscontext, sizeof(current->context));
 				}
 			}
 			ast_config_destroy(ucfg);
@@ -10446,12 +10446,12 @@
 					while (var) {
 						struct vm_zone *z;
 						if ((z = ast_malloc(sizeof(*z)))) {
-							char *msg_format, *timezone;
+							char *msg_format, *tzone;
 							msg_format = ast_strdupa(var->value);
-							timezone = strsep(&msg_format, "|");
+							tzone = strsep(&msg_format, "|");
 							if (msg_format) {
 								ast_copy_string(z->name, var->name, sizeof(z->name));
-								ast_copy_string(z->timezone, timezone, sizeof(z->timezone));
+								ast_copy_string(z->timezone, tzone, sizeof(z->timezone));
 								ast_copy_string(z->msg_format, msg_format, sizeof(z->msg_format));
 								AST_LIST_LOCK(&zones);
 								AST_LIST_INSERT_HEAD(&zones, z, list);
@@ -10937,7 +10937,7 @@
 	int max_attempts = 3;
 	int attempts = 0;
 	int recorded = 0;
-	int message_exists = 0;
+	int msg_exists = 0;
 	signed char zero_gain = 0;
 	char tempfile[PATH_MAX];
 	char *acceptdtmf = "#";
@@ -10961,7 +10961,7 @@
 	while ((cmd >= 0) && (cmd != 't')) {
 		switch (cmd) {
 		case '1':
-			if (!message_exists) {
+			if (!msg_exists) {
 				/* In this case, 1 is to record a message */
 				cmd = '3';
 				break;
@@ -10987,7 +10987,7 @@
 			cmd = ast_stream_and_wait(chan, tempfile, AST_DIGIT_ANY);
 			break;
 		case '3':
-			message_exists = 0;
+			msg_exists = 0;
 			/* Record */
 			if (recorded == 1) 
 				ast_verb(3, "Re-recording the message\n");
@@ -11037,7 +11037,7 @@
 #endif
 			} else {
 				/* If all is well, a message exists */
-				message_exists = 1;
+				msg_exists = 1;
 				cmd = 0;
 			}
 			break;
@@ -11089,7 +11089,7 @@
 				cmd = ast_play_and_wait(chan, "vm-sorry");
 				break;
 			}
-			if (message_exists || recorded) {
+			if (msg_exists || recorded) {
 				cmd = ast_play_and_wait(chan, "vm-saveoper");
 				if (!cmd)
 					cmd = ast_waitfordigit(chan, 3000);
@@ -11116,7 +11116,7 @@
 			   their OGM's */
 			if (outsidecaller && !ast_test_flag(vmu, VM_REVIEW))
 				return cmd;
-			if (message_exists) {
+			if (msg_exists) {
 				cmd = ast_play_and_wait(chan, "vm-review");
 				if (!cmd && outsidecaller) {
 					if ((flag && ast_strlen_zero(flag)) || (!ast_strlen_zero(flag) && strcmp(flag, "Urgent"))) {

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Sun Aug 10 15:23:50 2008
@@ -645,7 +645,7 @@
 			"Value", "Average", "Name");
 	for (i = min; i < max; i++) {
 		struct profile_entry *entry = &prof_data->e[i];
-		if (!search || strstr(prof_data->e[i].name, search))
+		if (!search || strstr(entry->name, search))
 		    ast_cli(a->fd, "%6d: [%8ld] %10ld %12lld %12lld  %s\n",
 			i,
 			(long)entry->scale,

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sun Aug 10 15:23:50 2008
@@ -551,8 +551,8 @@
 
 int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset)
 {
-	struct timeval tv = { offset, };
-	return ast_channel_cmpwhentohangup_tv(chan, tv);
+	struct timeval when = { offset, };
+	return ast_channel_cmpwhentohangup_tv(chan, when);
 }
 
 /*! \brief Register a new telephony channel in Asterisk */

Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Sun Aug 10 15:23:50 2008
@@ -1625,7 +1625,7 @@
 
 static char *parse_args(const char *s, int *argc, char *argv[], int max, int *trailingwhitespace)
 {
-	char *dup, *cur;
+	char *duplicate, *cur;
 	int x = 0;
 	int quoted = 0;
 	int escaped = 0;
@@ -1638,10 +1638,10 @@
 	if (s == NULL)	/* invalid, though! */
 		return NULL;
 	/* make a copy to store the parsed string */
-	if (!(dup = ast_strdup(s)))
-		return NULL;
-
-	cur = dup;
+	if (!(duplicate = ast_strdup(s)))
+		return NULL;
+
+	cur = duplicate;
 	/* scan the original string copying into cur when needed */
 	for (; *s ; s++) {
 		if (x >= max - 1) {
@@ -1685,7 +1685,7 @@
 	argv[x] = NULL;
 	*argc = x;
 	*trailingwhitespace = whitespace;
-	return dup;
+	return duplicate;
 }
 
 /*! \brief Return the number of unique matches for the generator */
@@ -1777,9 +1777,9 @@
 	char matchstr[80] = "";
 	int tws = 0;
 	/* Split the argument into an array of words */
-	char *dup = parse_args(text, &x, argv, ARRAY_LEN(argv), &tws);
-
-	if (!dup)	/* malloc error */
+	char *duplicate = parse_args(text, &x, argv, ARRAY_LEN(argv), &tws);
+
+	if (!duplicate)	/* malloc error */
 		return NULL;
 
 	/* Compute the index of the last argument (could be an empty string) */
@@ -1844,7 +1844,7 @@
 	}
 	if (lock)
 		AST_RWLIST_UNLOCK(&helpers);
-	ast_free(dup);
+	ast_free(duplicate);
 	return ret;
 }
 
@@ -1858,12 +1858,12 @@
 	char *args[AST_MAX_ARGS + 1];
 	struct ast_cli_entry *e;
 	int x;
-	char *dup = parse_args(s, &x, args + 1, AST_MAX_ARGS, NULL);
+	char *duplicate = parse_args(s, &x, args + 1, AST_MAX_ARGS, NULL);
 	char *retval = NULL;
 	struct ast_cli_args a = {
 		.fd = fd, .argc = x, .argv = args+1 };
 
-	if (dup == NULL)
+	if (duplicate == NULL)
 		return -1;
 
 	if (x < 1)	/* We need at least one entry, otherwise ignore */
@@ -1904,7 +1904,7 @@
 	}
 	ast_atomic_fetchadd_int(&e->inuse, -1);
 done:
-	ast_free(dup);
+	ast_free(duplicate);
 	return 0;
 }
 

Modified: trunk/main/frame.c
URL: http://svn.digium.com/view/asterisk/trunk/main/frame.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/main/frame.c (original)
+++ trunk/main/frame.c Sun Aug 10 15:23:50 2008
@@ -496,9 +496,9 @@
 }
 
 
-struct ast_format_list *ast_get_format_list_index(int index) 
-{
-	return &AST_FORMAT_LIST[index];
+struct ast_format_list *ast_get_format_list_index(int idx) 
+{
+	return &AST_FORMAT_LIST[idx];
 }
 
 struct ast_format_list *ast_get_format_list(size_t *size) 
@@ -997,16 +997,15 @@
 	return size - total_len;
 }
 
-int ast_codec_pref_index(struct ast_codec_pref *pref, int index) 
+int ast_codec_pref_index(struct ast_codec_pref *pref, int idx)
 {
 	int slot = 0;
 
-	
-	if ((index >= 0) && (index < sizeof(pref->order))) {
-		slot = pref->order[index];
-	}
-
-	return slot ? AST_FORMAT_LIST[slot-1].bits : 0;
+	if ((idx >= 0) && (idx < sizeof(pref->order))) {
+		slot = pref->order[idx];
+	}
+
+	return slot ? AST_FORMAT_LIST[slot - 1].bits : 0;
 }
 
 /*! \brief Remove codec from pref list */
@@ -1102,34 +1101,33 @@
 /*! \brief Set packet size for codec */
 int ast_codec_pref_setsize(struct ast_codec_pref *pref, int format, int framems)
 {
-	int x, index = -1;
+	int x, idx = -1;
 
 	for (x = 0; x < ARRAY_LEN(AST_FORMAT_LIST); x++) {
 		if (AST_FORMAT_LIST[x].bits == format) {
-			index = x;
-			break;
-		}
-	}
-
-	if (index < 0)
+			idx = x;
+			break;
+		}
+	}
+
+	if (idx < 0)
 		return -1;
 
 	/* size validation */
 	if (!framems)
-		framems = AST_FORMAT_LIST[index].def_ms;
-
-	if (AST_FORMAT_LIST[index].inc_ms && framems % AST_FORMAT_LIST[index].inc_ms) /* avoid division by zero */
-		framems -= framems % AST_FORMAT_LIST[index].inc_ms;
-
-	if (framems < AST_FORMAT_LIST[index].min_ms)
-		framems = AST_FORMAT_LIST[index].min_ms;
-
-	if (framems > AST_FORMAT_LIST[index].max_ms)
-		framems = AST_FORMAT_LIST[index].max_ms;
-
+		framems = AST_FORMAT_LIST[idx].def_ms;
+
+	if (AST_FORMAT_LIST[idx].inc_ms && framems % AST_FORMAT_LIST[idx].inc_ms) /* avoid division by zero */
+		framems -= framems % AST_FORMAT_LIST[idx].inc_ms;
+
+	if (framems < AST_FORMAT_LIST[idx].min_ms)
+		framems = AST_FORMAT_LIST[idx].min_ms;
+
+	if (framems > AST_FORMAT_LIST[idx].max_ms)
+		framems = AST_FORMAT_LIST[idx].max_ms;
 
 	for (x = 0; x < ARRAY_LEN(AST_FORMAT_LIST); x++) {
-		if (pref->order[x] == (index + 1)) {
+		if (pref->order[x] == (idx + 1)) {
 			pref->framing[x] = framems;
 			break;
 		}
@@ -1141,19 +1139,19 @@
 /*! \brief Get packet size for codec */
 struct ast_format_list ast_codec_pref_getsize(struct ast_codec_pref *pref, int format)
 {
-	int x, index = -1, framems = 0;
+	int x, idx = -1, framems = 0;
 	struct ast_format_list fmt = { 0, };
 
 	for (x = 0; x < ARRAY_LEN(AST_FORMAT_LIST); x++) {
 		if (AST_FORMAT_LIST[x].bits == format) {
 			fmt = AST_FORMAT_LIST[x];
-			index = x;
+			idx = x;
 			break;
 		}
 	}
 
 	for (x = 0; x < ARRAY_LEN(AST_FORMAT_LIST); x++) {
-		if (pref->order[x] == (index + 1)) {
+		if (pref->order[x] == (idx + 1)) {
 			framems = pref->framing[x];
 			break;
 		}
@@ -1161,16 +1159,16 @@
 
 	/* size validation */
 	if (!framems)
-		framems = AST_FORMAT_LIST[index].def_ms;
-
-	if (AST_FORMAT_LIST[index].inc_ms && framems % AST_FORMAT_LIST[index].inc_ms) /* avoid division by zero */
-		framems -= framems % AST_FORMAT_LIST[index].inc_ms;
-
-	if (framems < AST_FORMAT_LIST[index].min_ms)
-		framems = AST_FORMAT_LIST[index].min_ms;
-
-	if (framems > AST_FORMAT_LIST[index].max_ms)
-		framems = AST_FORMAT_LIST[index].max_ms;
+		framems = AST_FORMAT_LIST[idx].def_ms;
+
+	if (AST_FORMAT_LIST[idx].inc_ms && framems % AST_FORMAT_LIST[idx].inc_ms) /* avoid division by zero */
+		framems -= framems % AST_FORMAT_LIST[idx].inc_ms;
+
+	if (framems < AST_FORMAT_LIST[idx].min_ms)
+		framems = AST_FORMAT_LIST[idx].min_ms;
+
+	if (framems > AST_FORMAT_LIST[idx].max_ms)
+		framems = AST_FORMAT_LIST[idx].max_ms;
 
 	fmt.cur_ms = framems;
 

Modified: trunk/main/indications.c
URL: http://svn.digium.com/view/asterisk/trunk/main/indications.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/main/indications.c (original)
+++ trunk/main/indications.c Sun Aug 10 15:23:50 2008
@@ -233,55 +233,55 @@
 		separator = ",";
 	s = strsep(&stringp,separator);
 	while (s && *s) {
-		int freq1, freq2, time, modulate = 0, midinote = 0;
+		int freq1, freq2, duration, modulate = 0, midinote = 0;
 
 		if (s[0]=='!')
 			s++;
 		else if (d.reppos == -1)
 			d.reppos = d.nitems;
-		if (sscanf(s, "%d+%d/%d", &freq1, &freq2, &time) == 3) {
+		if (sscanf(s, "%d+%d/%d", &freq1, &freq2, &duration) == 3) {
 			/* f1+f2/time format */
 		} else if (sscanf(s, "%d+%d", &freq1, &freq2) == 2) {
 			/* f1+f2 format */
-			time = 0;
-		} else if (sscanf(s, "%d*%d/%d", &freq1, &freq2, &time) == 3) {
+			duration = 0;
+		} else if (sscanf(s, "%d*%d/%d", &freq1, &freq2, &duration) == 3) {
 			/* f1*f2/time format */
 			modulate = 1;
 		} else if (sscanf(s, "%d*%d", &freq1, &freq2) == 2) {
 			/* f1*f2 format */
-			time = 0;
+			duration = 0;
 			modulate = 1;
-		} else if (sscanf(s, "%d/%d", &freq1, &time) == 2) {
+		} else if (sscanf(s, "%d/%d", &freq1, &duration) == 2) {
 			/* f1/time format */
 			freq2 = 0;
 		} else if (sscanf(s, "%d", &freq1) == 1) {
 			/* f1 format */
 			freq2 = 0;
-			time = 0;
-		} else if (sscanf(s, "M%d+M%d/%d", &freq1, &freq2, &time) == 3) {
+			duration = 0;
+		} else if (sscanf(s, "M%d+M%d/%d", &freq1, &freq2, &duration) == 3) {
 			/* Mf1+Mf2/time format */
 			midinote = 1;
 		} else if (sscanf(s, "M%d+M%d", &freq1, &freq2) == 2) {
 			/* Mf1+Mf2 format */
-			time = 0;
+			duration = 0;
 			midinote = 1;
-		} else if (sscanf(s, "M%d*M%d/%d", &freq1, &freq2, &time) == 3) {
+		} else if (sscanf(s, "M%d*M%d/%d", &freq1, &freq2, &duration) == 3) {
 			/* Mf1*Mf2/time format */
 			modulate = 1;
 			midinote = 1;
 		} else if (sscanf(s, "M%d*M%d", &freq1, &freq2) == 2) {
 			/* Mf1*Mf2 format */
-			time = 0;
+			duration = 0;
 			modulate = 1;
 			midinote = 1;
-		} else if (sscanf(s, "M%d/%d", &freq1, &time) == 2) {
+		} else if (sscanf(s, "M%d/%d", &freq1, &duration) == 2) {
 			/* Mf1/time format */
 			freq2 = -1;
 			midinote = 1;
 		} else if (sscanf(s, "M%d", &freq1) == 1) {
 			/* Mf1 format */
 			freq2 = -1;
-			time = 0;
+			duration = 0;
 			midinote = 1;
 		} else {
 			ast_log(LOG_WARNING,"%s: tone component '%s' of '%s' is no good\n",chan->name,s,playlst);
@@ -311,7 +311,7 @@
 		d.items[d.nitems].fac2 = 2.0 * cos(2.0 * M_PI * (freq2 / 8000.0)) * 32768.0;
 		d.items[d.nitems].init_v2_2 = sin(-4.0 * M_PI * (freq2 / 8000.0)) * d.vol;
 		d.items[d.nitems].init_v3_2 = sin(-2.0 * M_PI * (freq2 / 8000.0)) * d.vol;
-		d.items[d.nitems].duration = time;
+		d.items[d.nitems].duration = duration;
 		d.items[d.nitems].modulate = modulate;
 		d.nitems++;
 

Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=137089&r1=137088&r2=137089
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Sun Aug 10 15:23:50 2008
@@ -1086,7 +1086,7 @@
 	struct logmsg *logmsg = NULL;
 	struct ast_str *buf = NULL;
 	struct ast_tm tm;
-	struct timeval tv = ast_tvnow();
+	struct timeval now = ast_tvnow();
 	int res = 0;
 	va_list ap;
 
@@ -1099,11 +1099,11 @@
 		 * so just log to stdout
 		 */
 		if (level != __LOG_VERBOSE) {
-			int res;
+			int result;
 			va_start(ap, fmt);
-			res = ast_str_set_va(&buf, BUFSIZ, fmt, ap); /* XXX BUFSIZ ? */
+			result = ast_str_set_va(&buf, BUFSIZ, fmt, ap); /* XXX BUFSIZ ? */
 			va_end(ap);
-			if (res != AST_DYNSTR_BUILD_FAILED) {
+			if (result != AST_DYNSTR_BUILD_FAILED) {
 				term_filter_escapes(buf->str);
 				fputs(buf->str, stdout);
 			}
@@ -1144,7 +1144,7 @@
 	logmsg->type = LOGMSG_NORMAL;
 
 	/* Create our date/time */
-	ast_localtime(&tv, &tm, NULL);
+	ast_localtime(&now, &tm, NULL);
 	ast_strftime(logmsg->date, sizeof(logmsg->date), dateformat, &tm);
 
 	/* Copy over data */
@@ -1206,25 +1206,25 @@
 void ast_backtrace(void)
 {
 #ifdef HAVE_BKTR
-	struct ast_bt *backtrace;
+	struct ast_bt *bt;
 	int i = 0;
 	char **strings;
 
-	if (!(backtrace = ast_bt_create())) {
+	if (!(bt = ast_bt_create())) {
 		ast_log(LOG_WARNING, "Unable to allocate space for backtrace structure\n");
 		return;
 	}
 
-	if ((strings = backtrace_symbols(backtrace->addresses, backtrace->num_frames))) {
-		ast_debug(1, "Got %d backtrace record%c\n", backtrace->num_frames, backtrace->num_frames != 1 ? 's' : ' ');
-		for (i = 0; i < backtrace->num_frames; i++) {
-			ast_log(LOG_DEBUG, "#%d: [%p] %s\n", i, backtrace->addresses[i], strings[i]);
+	if ((strings = backtrace_symbols(bt->addresses, bt->num_frames))) {
+		ast_debug(1, "Got %d backtrace record%c\n", bt->num_frames, bt->num_frames != 1 ? 's' : ' ');
+		for (i = 0; i < bt->num_frames; i++) {

[... 205 lines stripped ...]



More information about the asterisk-commits mailing list