diff options
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_agent.c | 1 | ||||
-rw-r--r-- | channels/chan_gtalk.c | 4 | ||||
-rw-r--r-- | channels/chan_oss.c | 8 | ||||
-rw-r--r-- | channels/chan_phone.c | 13 | ||||
-rw-r--r-- | channels/chan_skinny.c | 19 |
5 files changed, 21 insertions, 24 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 4ce43a5a3..836154092 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -778,7 +778,6 @@ static int agent_indicate(struct ast_channel *ast, int condition, const void *da 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); diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 9e8425692..c13cbfc7d 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -958,9 +958,9 @@ static int gtalk_create_candidates(struct gtalk *client, struct gtalk_pvt *p, ch /* 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); diff --git a/channels/chan_oss.c b/channels/chan_oss.c index ddd559af1..ca26e7922 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -1099,16 +1099,16 @@ static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args 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; diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 6926a7d4f..f7e7c335e 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -1018,7 +1018,7 @@ static void *do_monitor(void *data) 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 @@ static void *do_monitor(void *data) 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 @@ static void *do_monitor(void *data) if (tonepos >= sizeof(DialTone)) { tonepos = 0; } - if (ast_tvzero(tv)) { - tv = ast_tv(0, 30000); + if (ast_tvzero(to)) { + to = ast_tv(0, 30000); } - res = ast_poll2(fds, inuse_fds, &tv); + 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 @@ static int load_module(void) } 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")) { diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 0323237e3..c4f44345c 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -5392,7 +5392,7 @@ static void dumpsub(struct skinny_subchannel *sub, int forcehangup) { 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 @@ static void dumpsub(struct skinny_subchannel *sub, int forcehangup) 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 @@ static void dumpsub(struct skinny_subchannel *sub, int forcehangup) 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 @@ static int handle_message(struct skinny_req *req, struct skinnysession *s) break; case KEYPAD_BUTTON_MESSAGE: { - struct skinny_device *d = s->device; struct skinny_subchannel *sub; int lineInstance; int callReference; |