change from sqlite hash to newly added one

This commit is contained in:
Anthony Minessale committed 2014-03-09 00:37:17 +05:00
1 parent 32cce8027e
commit 804ef7709d
83 files changed
+1868 -835

No files matched your search

@@ -810,8 +810,8 @@ SWITCH_STANDARD_API(show_local_stream_function)
switch_mutex_lock(globals.mutex);
if (zstr(cmd)) {
for (hi = switch_hash_first(NULL, globals.source_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &var, NULL, &val);
for (hi = switch_core_hash_first( globals.source_hash); hi; hi = switch_core_hash_next(hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((source = (local_stream_source_t *) val)) {
stream->write_function(stream, "%s,%s\n", source->name, source->location);
}
@@ -981,7 +981,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_local_stream_load)
memset(&globals, 0, sizeof(globals));
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, pool);
switch_core_hash_init(&globals.source_hash, pool);
switch_core_hash_init(&globals.source_hash);
if (!launch_streams(NULL)) {
return SWITCH_STATUS_GENERR;
}
@@ -582,7 +582,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_stream_load)
globals.running = 1;
globals.threads = 0;
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_core_hash_init(&globals.source_hash, module_pool);
switch_core_hash_init(&globals.source_hash);
/* indicate that the module should continue to be loaded */
+1 -1
View File
@@ -434,7 +434,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load)
{
switch_file_interface_t *file_interface;
switch_core_hash_init(&globals.format_hash, pool);
switch_core_hash_init(&globals.format_hash);
if (setup_formats() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
+9 -9
View File
@@ -198,7 +198,7 @@ struct ssml_context {
static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
{
struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
switch_core_hash_init(&def->children_tags, globals.pool);
switch_core_hash_init(&def->children_tags);
if (!zstr(children_tags)) {
char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
char *tags[32] = { 0 };
@@ -339,12 +339,12 @@ static struct voice *find_voice(struct ssml_node *cur_node, switch_hash_t *map,
}
/* find best language, name, gender match */
for (hi = switch_hash_first(NULL, map); hi; hi = switch_hash_next(hi)) {
for (hi = switch_core_hash_first( map); hi; hi = switch_core_hash_next(hi)) {
const void *key;
void *val;
struct voice *candidate;
int candidate_score = 0;
switch_hash_this(hi, &key, NULL, &val);
switch_core_hash_this(hi, &key, NULL, &val);
candidate = (struct voice *)val;
candidate_score = score_voice(candidate, cur_node, lang_required);
if (candidate_score > 0 && candidate_score > best_score) {
@@ -1110,12 +1110,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_ssml_load)
*/
globals.pool = pool;
switch_core_hash_init(&globals.voice_cache, pool);
switch_core_hash_init(&globals.tts_voice_map, pool);
switch_core_hash_init(&globals.say_voice_map, pool);
switch_core_hash_init(&globals.interpret_as_map, pool);
switch_core_hash_init(&globals.language_map, pool);
switch_core_hash_init(&globals.tag_defs, pool);
switch_core_hash_init(&globals.voice_cache);
switch_core_hash_init(&globals.tts_voice_map);
switch_core_hash_init(&globals.say_voice_map);
switch_core_hash_init(&globals.interpret_as_map);
switch_core_hash_init(&globals.language_map);
switch_core_hash_init(&globals.tag_defs);
add_root_tag_def("speak", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,p,s,lexicon,metadata,meta");
add_tag_def("p", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,s");