summaryrefslogtreecommitdiff
path: root/channels/chan_console.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2008-08-09 12:53:57 +0000
committerSean Bright <sean@malleable.com>2008-08-09 12:53:57 +0000
commitbea1644dc27af9d6f48cbeb8fce118122c761b5f (patch)
tree5b4be7cfd39b71f459a41c650fab62f5f4f946fe /channels/chan_console.c
parentc5a119d86d5e5f452bd3cea2d0f61bb0cfdef283 (diff)
Merge more changes from the resolve-shadow-warnings branch (henceforth known
as RSW since i am too lazy to keep typing it all out). This time a few of the channels. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_console.c')
-rw-r--r--channels/chan_console.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 6924ade3f..c9a59cab3 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -311,7 +311,7 @@ static int open_stream(struct console_pvt *pvt)
.suggestedLatency = (1.0 / 50.0), /* 20 ms */
.device = paNoDevice,
};
- PaDeviceIndex index, num_devices, def_input, def_output;
+ PaDeviceIndex idx, num_devices, def_input, def_output;
if (!(num_devices = Pa_GetDeviceCount()))
return res;
@@ -319,23 +319,23 @@ static int open_stream(struct console_pvt *pvt)
def_input = Pa_GetDefaultInputDevice();
def_output = Pa_GetDefaultOutputDevice();
- for (index = 0;
- index < num_devices && (input_params.device == paNoDevice
+ for (idx = 0;
+ idx < num_devices && (input_params.device == paNoDevice
|| output_params.device == paNoDevice);
- index++)
+ idx++)
{
- const PaDeviceInfo *dev = Pa_GetDeviceInfo(index);
+ const PaDeviceInfo *dev = Pa_GetDeviceInfo(idx);
if (dev->maxInputChannels) {
- if ( (index == def_input && !strcasecmp(pvt->input_device, "default")) ||
+ if ( (idx == def_input && !strcasecmp(pvt->input_device, "default")) ||
!strcasecmp(pvt->input_device, dev->name) )
- input_params.device = index;
+ input_params.device = idx;
}
if (dev->maxOutputChannels) {
- if ( (index == def_output && !strcasecmp(pvt->output_device, "default")) ||
+ if ( (idx == def_output && !strcasecmp(pvt->output_device, "default")) ||
!strcasecmp(pvt->output_device, dev->name) )
- output_params.device = index;
+ output_params.device = idx;
}
}
@@ -922,7 +922,7 @@ static char *cli_console_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_a
static char *cli_list_available(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- PaDeviceIndex index, num, def_input, def_output;
+ PaDeviceIndex idx, num, def_input, def_output;
if (cmd == CLI_INIT) {
e->command = "console list available";
@@ -950,16 +950,16 @@ static char *cli_list_available(struct ast_cli_entry *e, int cmd, struct ast_cli
def_input = Pa_GetDefaultInputDevice();
def_output = Pa_GetDefaultOutputDevice();
- for (index = 0; index < num; index++) {
- const PaDeviceInfo *dev = Pa_GetDeviceInfo(index);
+ for (idx = 0; idx < num; idx++) {
+ const PaDeviceInfo *dev = Pa_GetDeviceInfo(idx);
if (!dev)
continue;
ast_cli(a->fd, "=== ---------------------------------------------------------\n"
"=== Device Name: %s\n", dev->name);
if (dev->maxInputChannels)
- ast_cli(a->fd, "=== ---> %sInput Device\n", (index == def_input) ? "Default " : "");
+ ast_cli(a->fd, "=== ---> %sInput Device\n", (idx == def_input) ? "Default " : "");
if (dev->maxOutputChannels)
- ast_cli(a->fd, "=== ---> %sOutput Device\n", (index == def_output) ? "Default " : "");
+ ast_cli(a->fd, "=== ---> %sOutput Device\n", (idx == def_output) ? "Default " : "");
ast_cli(a->fd, "=== ---------------------------------------------------------\n===\n");
}