提交 64fa492c authored 作者: Anthony Minessale's avatar Anthony Minessale

git-svn-id: http://svn.freeswitch.org/svn/local/src/freeswitch@33 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 c01811f8
......@@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
Optimization="0"
AdditionalIncludeDirectories="..\..\src\include;"$(InputDir)..\..\..\libs\apr-1.2.2\include";..\..\..\eXosip\include;..\..\..\osip\include"
AdditionalIncludeDirectories="..\..\src\include;"$(InputDir)..\..\..\libs\apr-1.2.2\include";..\..\..\eXosip\include;..\..\..\osip\include;..\..\..\jrtp4c\src"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
GeneratePreprocessedFile="0"
MinimalRebuild="true"
......@@ -64,7 +64,8 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Ws2_32.lib Iphlpapi.lib ccrtp4c.lib"
AdditionalOptions="/NODEFAULTLIB:LIBCMT"
AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libcpmt.lib"
ShowProgress="0"
OutputFile="$(OutDir)/mod/mod_exosip.dll"
LinkIncremental="2"
......
......@@ -44,7 +44,7 @@ extern "C" {
//#include <apr_poll.h>
//#include <sys/types.h>
#define SWITCH_GLOBAL_VERSION "001"
#define SWITCH_GLOBAL_VERSION "1.5"
typedef enum {
SWITCH_STATUS_SUCCESS,
......@@ -190,13 +190,13 @@ typedef apr_thread_cond_t switch_thread_cond_t;
#define SWITCH_READ APR_READ
#define SWITCH_FPROT_UREAD APR_FPROT_UREAD
#define SWITCH_FPROT_GREAD APR_FPROT_GREAD
#define switch_thread_cond_create apr_thread_cond_create
#define switch_thread_cond_wait apr_thread_cond_wait
#define switch_thread_cond_timedwait apr_thread_cond_timedwait
#define switch_thread_cond_signal apr_thread_cond_signal
#define switch_thread_cond_broadcast apr_thread_cond_broadcast
#define switch_thread_cond_destroy apr_thread_cond_destroy
#define switch_thread_cond_create apr_thread_cond_create
#define switch_thread_cond_wait apr_thread_cond_wait
#define switch_thread_cond_timedwait apr_thread_cond_timedwait
#define switch_thread_cond_signal apr_thread_cond_signal
#define switch_thread_cond_broadcast apr_thread_cond_broadcast
#define switch_thread_cond_destroy apr_thread_cond_destroy
#define switch_poll_setup apr_poll_setup
#define switch_pollset_create apr_pollset_create
......
......@@ -344,14 +344,19 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_set_state(switch_channel *ch
}
if (ok) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s State Change %s -> %s\n", channel->name, state_names[last_state], state_names[state]);
channel->state = state;
pbx_core_session_signal_state_change(channel->session);
} else {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s Invalid State Change %s -> %s\n", channel->name, state_names[last_state], state_names[state]);
//we won't tolerate an invalid state change so we can make sure we are as robust as a nice cup of dark coffee!
assert(0);
if (channel->state < CS_HANGUP) {
// not cool lets crash this bad boy and figure out wtf is going on
assert(0);
}
}
return channel->state;
}
......
......@@ -96,7 +96,6 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_mem
assert(filename != NULL);
*new_module = NULL;
status = apr_dso_load(&dso, filename, pool);
while (loading) {
......@@ -185,6 +184,13 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_init()
apr_dir_t *module_dir_handle;
apr_int32_t finfo_flags = APR_FINFO_DIRENT|APR_FINFO_TYPE|APR_FINFO_NAME;
switch_loadable_module *new_module;
#ifdef WIN32
const char *ext = ".dll";
const char *EXT = ".DLL";
#else
const char *ext = ".so";
const char *EXT = ".SO";
#endif
memset(&loadable_modules, 0, sizeof(loadable_modules));
switch_core_new_memory_pool(&loadable_modules.pool);
......@@ -215,6 +221,11 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_init()
if (!(ptr = (char *) fname)) {
continue;
}
if (!strstr(fname, ext) && !strstr(fname, EXT)) {
continue;
}
len = strlen(SWITCH_MOD_DIR) + strlen(fname) + 3;
file = (char *) switch_core_alloc(loadable_modules.pool, len);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论