[Freeswitch-svn] [commit] r7958 - freeswitch/trunk/src/mod/applications/mod_fifo
Freeswitch SVN
mikej at freeswitch.org
Tue Mar 25 10:29:43 EDT 2008
Author: mikej
Date: Tue Mar 25 10:29:43 2008
New Revision: 7958
Modified:
freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
Log:
varname scope masking
Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c Tue Mar 25 10:29:43 2008
@@ -337,10 +337,7 @@
int custom_pop = 0;
int pop_array[MAX_PRI] = { 0 };
char *pop_list[MAX_PRI] = { 0 };
- const char *fifo_consumer_wrapup_sound = NULL;
- const char *fifo_consumer_wrapup_key = NULL;
- char buf[5] = "";
-
+
if (argc > 3) {
announce = argv[3];
}
@@ -382,17 +379,15 @@
}
for (x = 0; x < custom_pop; x++) {
- int tmp = atoi(pop_list[x]);
- if (tmp > -1 && tmp < MAX_PRI) {
- pop_array[x] = tmp;
+ int temp = atoi(pop_list[x]);
+ if (temp > -1 && temp < MAX_PRI) {
+ pop_array[x] = temp;
}
}
}
while(switch_channel_ready(channel)) {
int x = 0 ;
- pop = NULL;
-
if (moh) {
args.read_frame_callback = read_frame_callback;
args.user_data = node;
@@ -428,7 +423,6 @@
}
uuid = (char *) pop;
- pop = NULL;
if ((other_session = switch_core_session_locate(uuid))) {
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
@@ -511,28 +505,6 @@
if (nowait) {
done = 1;
}
-
- fifo_consumer_wrapup_sound = switch_channel_get_variable(channel, "fifo_consumer_wrapup_sound");
- fifo_consumer_wrapup_key = switch_channel_get_variable(channel, "fifo_consumer_wrapup_key");
- memset(buf, 0, sizeof(buf));
-
- if (!switch_strlen_zero(fifo_consumer_wrapup_sound)) {
- args.buf = buf;
- args.buflen = sizeof(buf);
-
- memset(&args, 0, sizeof(args));
- switch_ivr_play_file(session, NULL, fifo_consumer_wrapup_sound, &args);
- }
-
- if (!switch_strlen_zero(fifo_consumer_wrapup_key) && strcmp(buf, fifo_consumer_wrapup_key)) {
- for(;;) {
- char terminator = 0;
- switch_ivr_collect_digits_count(session, buf, sizeof(buf)-1, 1, fifo_consumer_wrapup_key, &terminator, 0, 0, 0);
- if (terminator == *fifo_consumer_wrapup_key) {
- break;
- }
- }
- }
}
switch_safe_free(uuid);
More information about the Freeswitch-svn
mailing list