mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
doh
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16062 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0e2fe14aa6
commit
6812bfc771
@ -74,8 +74,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "uuid.h"
|
|
||||||
|
|
||||||
/* #define DEBUG_ALLOC */
|
/* #define DEBUG_ALLOC */
|
||||||
#define DO_EVENTS
|
#define DO_EVENTS
|
||||||
|
|
||||||
@ -194,7 +192,6 @@ struct switch_runtime {
|
|||||||
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
|
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
switch_time_t timestamp;
|
switch_time_t timestamp;
|
||||||
switch_mutex_t *uuid_mutex;
|
|
||||||
switch_mutex_t *throttle_mutex;
|
switch_mutex_t *throttle_mutex;
|
||||||
switch_mutex_t *session_hash_mutex;
|
switch_mutex_t *session_hash_mutex;
|
||||||
switch_mutex_t *global_mutex;
|
switch_mutex_t *global_mutex;
|
||||||
@ -215,7 +212,6 @@ struct switch_runtime {
|
|||||||
char *odbc_user;
|
char *odbc_user;
|
||||||
char *odbc_pass;
|
char *odbc_pass;
|
||||||
uint32_t debug_level;
|
uint32_t debug_level;
|
||||||
uuid_t *uuid;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct switch_runtime runtime;
|
extern struct switch_runtime runtime;
|
||||||
|
@ -2049,7 +2049,6 @@ SWITCH_DECLARE(switch_status_t) switch_cache_db_persistant_execute_trans(switch_
|
|||||||
SWITCH_DECLARE(void) switch_cache_db_detach(void);
|
SWITCH_DECLARE(void) switch_cache_db_detach(void);
|
||||||
SWITCH_DECLARE(uint32_t) switch_core_debug_level(void);
|
SWITCH_DECLARE(uint32_t) switch_core_debug_level(void);
|
||||||
SWITCH_DECLARE(void) switch_cache_db_flush_handles(void);
|
SWITCH_DECLARE(void) switch_cache_db_flush_handles(void);
|
||||||
SWITCH_DECLARE(void) switch_core_uuid_get(switch_uuid_t *uuid);
|
|
||||||
|
|
||||||
SWITCH_END_EXTERN_C
|
SWITCH_END_EXTERN_C
|
||||||
#endif
|
#endif
|
||||||
|
@ -883,8 +883,7 @@ SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t *uuid)
|
|||||||
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid)
|
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
//apr_uuid_get((apr_uuid_t *) uuid);
|
apr_uuid_get((apr_uuid_t *) uuid);
|
||||||
switch_core_uuid_get(uuid);
|
|
||||||
#else
|
#else
|
||||||
UuidCreate((UUID*)uuid);
|
UuidCreate((UUID*)uuid);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1166,22 +1166,6 @@ static void switch_core_set_serial(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SWITCH_DECLARE(void) switch_core_uuid_get(switch_uuid_t *uuid)
|
|
||||||
{
|
|
||||||
size_t n;
|
|
||||||
void *vp;
|
|
||||||
uuid_t *xuuid;
|
|
||||||
|
|
||||||
uuid_create(&xuuid);
|
|
||||||
|
|
||||||
switch_mutex_lock(runtime.uuid_mutex);
|
|
||||||
uuid_make(xuuid, UUID_MAKE_V4);
|
|
||||||
uuid_export(xuuid, UUID_FMT_BIN, &vp, &n);
|
|
||||||
//memcpy(xuuid, vp, n);
|
|
||||||
switch_mutex_unlock(runtime.uuid_mutex);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switch_bool_t console, const char **err)
|
SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switch_bool_t console, const char **err)
|
||||||
{
|
{
|
||||||
switch_uuid_t uuid;
|
switch_uuid_t uuid;
|
||||||
@ -1218,7 +1202,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
|||||||
}
|
}
|
||||||
switch_assert(runtime.memory_pool != NULL);
|
switch_assert(runtime.memory_pool != NULL);
|
||||||
|
|
||||||
|
|
||||||
dir_path = switch_mprintf("%s%ssounds", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
|
dir_path = switch_mprintf("%s%ssounds", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_safe_free(dir_path);
|
switch_safe_free(dir_path);
|
||||||
@ -1233,8 +1216,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
|||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.temp_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.temp_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
|
|
||||||
switch_mutex_init(&runtime.uuid_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
|
||||||
uuid_create(&runtime.uuid);
|
|
||||||
|
|
||||||
switch_mutex_init(&runtime.throttle_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
switch_mutex_init(&runtime.throttle_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
||||||
switch_mutex_init(&runtime.session_hash_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
switch_mutex_init(&runtime.session_hash_mutex, SWITCH_MUTEX_NESTED, runtime.memory_pool);
|
||||||
|
@ -198,10 +198,7 @@ static void *SWITCH_THREAD_FUNC collect_thread_run(switch_thread_t *thread, void
|
|||||||
switch_input_args_t args = { 0 };
|
switch_input_args_t args = { 0 };
|
||||||
args.buf = buf;
|
args.buf = buf;
|
||||||
args.buflen = sizeof(buf);
|
args.buflen = sizeof(buf);
|
||||||
if (switch_ivr_play_file(collect->session, NULL, collect->file, &args) != SWITCH_STATUS_SUCCESS) {
|
switch_ivr_play_file(collect->session, NULL, collect->file, &args);
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(collect->session), SWITCH_LOG_ERROR, "%s Error Playing File!", switch_channel_get_name(channel));
|
|
||||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
switch_ivr_collect_digits_count(collect->session, buf, sizeof(buf), 1, SWITCH_BLANK_STRING, &term, 0, 0, 0);
|
switch_ivr_collect_digits_count(collect->session, buf, sizeof(buf), 1, SWITCH_BLANK_STRING, &term, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user