[asterisk-commits] seanbright: trunk r358647 - in /trunk: apps/confbridge/ channels/ pbx/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 8 11:02:54 CST 2012
Author: seanbright
Date: Thu Mar 8 11:02:52 2012
New Revision: 358647
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358647
Log:
Eliminate a bunch of shadow warnings.
Modified:
trunk/apps/confbridge/conf_config_parser.c
trunk/channels/chan_agent.c
trunk/channels/chan_gtalk.c
trunk/channels/chan_oss.c
trunk/channels/chan_phone.c
trunk/channels/chan_skinny.c
trunk/pbx/pbx_config.c
trunk/pbx/pbx_dundi.c
trunk/pbx/pbx_lua.c
Modified: trunk/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_config_parser.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/apps/confbridge/conf_config_parser.c (original)
+++ trunk/apps/confbridge/conf_config_parser.c Thu Mar 8 11:02:52 2012
@@ -711,9 +711,9 @@
/* if adding any of the actions failed, bail */
if (res) {
- struct conf_menu_action *action;
- while ((action = AST_LIST_REMOVE_HEAD(&menu_entry->actions, action))) {
- ast_free(action);
+ struct conf_menu_action *menu_action;
+ while ((menu_action = AST_LIST_REMOVE_HEAD(&menu_entry->actions, action))) {
+ ast_free(menu_action);
}
ast_free(menu_entry);
return -1;
Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Thu Mar 8 11:02:52 2012
@@ -778,7 +778,6 @@
ast_mutex_lock(&p->lock);
if (p->chan && !ast_check_hangup(p->chan)) {
while (ast_channel_trylock(p->chan)) {
- int res;
if ((res = ast_channel_unlock(ast))) {
ast_log(LOG_ERROR, "chan_agent bug! Channel was not locked upon entry to agent_indicate: %s\n", strerror(res));
ast_mutex_unlock(&p->lock);
Modified: trunk/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Thu Mar 8 11:02:52 2012
@@ -958,9 +958,9 @@
/* put the initiator attribute to lower case if we receive the call
* otherwise GoogleTalk won't establish the session */
if (!p->initiator) {
- char c;
+ char cur;
char *t = lowerfrom = ast_strdupa(from);
- while (((c = *t) != '/') && (*t++ = tolower(c)));
+ while (((cur = *t) != '/') && (*t++ = tolower(cur)));
}
iks_insert_attrib(gtalk, "initiator", (p->initiator) ? to : lowerfrom);
iks_insert_attrib(gtalk, "xmlns", GOOGLE_NS);
Modified: trunk/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_oss.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Thu Mar 8 11:02:52 2012
@@ -1099,16 +1099,16 @@
if (o->owner) { /* already in a call */
int i;
struct ast_frame f = { AST_FRAME_DTMF, { 0 } };
- const char *s;
+ const char *digits;
if (a->argc == e->args) { /* argument is mandatory here */
ast_cli(a->fd, "Already in a call. You can only dial digits until you hangup.\n");
return CLI_FAILURE;
}
- s = a->argv[e->args];
+ digits = a->argv[e->args];
/* send the string one char at a time */
- for (i = 0; i < strlen(s); i++) {
- f.subclass.integer = s[i];
+ for (i = 0; i < strlen(digits); i++) {
+ f.subclass.integer = digits[i];
ast_queue_frame(o->owner, &f);
}
return CLI_SUCCESS;
Modified: trunk/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_phone.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/channels/chan_phone.c (original)
+++ trunk/channels/chan_phone.c Thu Mar 8 11:02:52 2012
@@ -1018,7 +1018,7 @@
struct phone_pvt *i;
int tonepos = 0;
/* The tone we're playing this round */
- struct timeval tv = { 0, 0 };
+ struct timeval to = { 0, 0 };
int dotone;
/* This thread monitors all the frame relay interfaces which are not yet in use
(and thus do not have a separate thread) indefinitely */
@@ -1055,7 +1055,7 @@
if (i->dialtone && i->mode != MODE_SIGMA) {
/* Remember we're going to have to come back and play
more dialtones */
- if (ast_tvzero(tv)) {
+ if (ast_tvzero(to)) {
/* If we're due for a dialtone, play one */
if (write(i->fd, DialTone + tonepos, 240) != 240) {
ast_log(LOG_WARNING, "Dial tone write error\n");
@@ -1075,13 +1075,13 @@
if (tonepos >= sizeof(DialTone)) {
tonepos = 0;
}
- if (ast_tvzero(tv)) {
- tv = ast_tv(0, 30000);
- }
- res = ast_poll2(fds, inuse_fds, &tv);
+ if (ast_tvzero(to)) {
+ to = ast_tv(0, 30000);
+ }
+ res = ast_poll2(fds, inuse_fds, &to);
} else {
res = ast_poll(fds, inuse_fds, -1);
- tv = ast_tv(0, 0);
+ to = ast_tv(0, 0);
tonepos = 0;
}
/* Okay, select has finished. Let's see what happened. */
@@ -1437,7 +1437,6 @@
} else if (!strcasecmp(v->name, "context")) {
ast_copy_string(context, v->value, sizeof(context));
} else if (!strcasecmp(v->name, "format")) {
- struct ast_format tmpfmt;
if (!strcasecmp(v->value, "g729")) {
ast_format_cap_set(prefcap, ast_format_set(&tmpfmt, AST_FORMAT_G729A, 0));
} else if (!strcasecmp(v->value, "g723.1")) {
Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Thu Mar 8 11:02:52 2012
@@ -5392,7 +5392,7 @@
{
struct skinny_line *l = sub->line;
struct skinny_device *d = l->device;
- struct skinny_subchannel *activatesub = NULL;
+ struct skinny_subchannel *activate_sub = NULL;
struct skinny_subchannel *tsub;
if (skinnydebug) {
@@ -5408,9 +5408,9 @@
d->hookstate = SKINNY_ONHOOK;
transmit_speaker_mode(d, SKINNY_SPEAKEROFF);
if (sub->related) {
- activatesub = sub->related;
+ activate_sub = sub->related;
setsubstate(sub, SUBSTATE_ONHOOK);
- l->activesub = activatesub;
+ l->activesub = activate_sub;
if (l->activesub->substate != SUBSTATE_HOLD) {
ast_log(LOG_WARNING, "Sub-%d was related but not at SUBSTATE_HOLD\n", sub->callid);
return;
@@ -5420,20 +5420,20 @@
setsubstate(sub, SUBSTATE_ONHOOK);
AST_LIST_TRAVERSE(&l->sub, tsub, list) {
if (tsub->substate == SUBSTATE_CALLWAIT) {
- activatesub = tsub;
+ activate_sub = tsub;
}
}
- if (activatesub) {
- setsubstate(activatesub, SUBSTATE_RINGIN);
+ if (activate_sub) {
+ setsubstate(activate_sub, SUBSTATE_RINGIN);
return;
}
AST_LIST_TRAVERSE(&l->sub, tsub, list) {
if (tsub->substate == SUBSTATE_HOLD) {
- activatesub = tsub;
+ activate_sub = tsub;
}
}
- if (activatesub) {
- setsubstate(activatesub, SUBSTATE_HOLD);
+ if (activate_sub) {
+ setsubstate(activate_sub, SUBSTATE_HOLD);
return;
}
}
@@ -6674,7 +6674,6 @@
break;
case KEYPAD_BUTTON_MESSAGE:
{
- struct skinny_device *d = s->device;
struct skinny_subchannel *sub;
int lineInstance;
int callReference;
Modified: trunk/pbx/pbx_config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_config.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/pbx/pbx_config.c (original)
+++ trunk/pbx/pbx_config.c Thu Mar 8 11:02:52 2012
@@ -1632,8 +1632,8 @@
v->value, cxt, v->lineno, vfile);
}
} else if (!strcasecmp(v->name, "switch") || !strcasecmp(v->name, "lswitch") || !strcasecmp(v->name, "eswitch")) {
- char *stringp = realvalue;
char *appl, *data;
+ stringp = realvalue;
if (!strcasecmp(v->name, "switch")) {
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
Modified: trunk/pbx/pbx_dundi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Thu Mar 8 11:02:52 2012
@@ -1224,7 +1224,7 @@
return 0;
}
-static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t crc32, int *lowexpiration)
+static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t crc, int *lowexpiration)
{
char key[256];
char eid_str[20];
@@ -1240,7 +1240,7 @@
dundi_eid_to_str_short(eid_str, sizeof(eid_str), peer_eid);
dundi_eid_to_str_short(eidroot_str, sizeof(eidroot_str), &req->root_eid);
ast_eid_to_str(eid_str_full, sizeof(eid_str_full), peer_eid);
- snprintf(key, sizeof(key), "%s/%s/%s/e%08x", eid_str, req->number, req->dcontext, crc32);
+ snprintf(key, sizeof(key), "%s/%s/%s/e%08x", eid_str, req->number, req->dcontext, crc);
res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
snprintf(key, sizeof(key), "%s/%s/%s/e%08x", eid_str, req->number, req->dcontext, 0);
res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
@@ -1255,7 +1255,7 @@
break;
x++;
/* Check for hints */
- snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08x", eid_str, tmp, req->dcontext, crc32);
+ snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08x", eid_str, tmp, req->dcontext, crc);
res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08x", eid_str, tmp, req->dcontext, 0);
res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration);
Modified: trunk/pbx/pbx_lua.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_lua.c?view=diff&rev=358647&r1=358646&r2=358647
==============================================================================
--- trunk/pbx/pbx_lua.c (original)
+++ trunk/pbx/pbx_lua.c Thu Mar 8 11:02:52 2012
@@ -1257,7 +1257,7 @@
lua_State *L;
if (!chan) {
- lua_State *L = luaL_newstate();
+ L = luaL_newstate();
if (!L) {
ast_log(LOG_ERROR, "Error allocating lua_State, no memory\n");
return NULL;
More information about the asterisk-commits
mailing list