From c040b0ff0d574bfb20c592dc2d446fdf1e7d0d70 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 9 Mar 2015 20:25:57 -0500 Subject: [PATCH] FS-7503: store stream name so same module can handle mutiple stream interfaces --- src/include/switch_module_interfaces.h | 1 + src/switch_core_file.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/include/switch_module_interfaces.h b/src/include/switch_module_interfaces.h index 711409b421..e1199ca990 100644 --- a/src/include/switch_module_interfaces.h +++ b/src/include/switch_module_interfaces.h @@ -359,6 +359,7 @@ struct switch_file_handle { switch_event_t *params; uint32_t cur_channels; uint32_t cur_samplerate; + char *stream_name; }; /*! \brief Abstract interface to an asr module */ diff --git a/src/switch_core_file.c b/src/switch_core_file.c index 547f643f0c..ca29b03bf2 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -108,6 +108,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file, switch_copy_string(stream_name, file_path, (rhs + 1) - file_path); ext = stream_name; file_path = rhs + 3; + fh->stream_name = switch_core_strdup(fh->memory_pool, stream_name); fh->file_path = switch_core_strdup(fh->memory_pool, file_path); is_stream = 1; } else {