mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-03 14:16:27 +00:00
windows build fixes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5767 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
87f62d1d0d
commit
8f963f4aea
@ -123,6 +123,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\udns""
|
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\udns""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
|
@ -916,7 +916,7 @@ static switch_status_t openmrcp_destroy()
|
|||||||
openmrcp_module.tts_profile = NULL;
|
openmrcp_module.tts_profile = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_core_hash_destroy(openmrcp_module.profile_hash);
|
switch_core_hash_destroy(&openmrcp_module.profile_hash);
|
||||||
openmrcp_module.profile_hash = NULL;
|
openmrcp_module.profile_hash = NULL;
|
||||||
|
|
||||||
/* one-time mrcp global destroy */
|
/* one-time mrcp global destroy */
|
||||||
|
@ -326,30 +326,26 @@ void BaseCDR::process_channel_variables(const std::list<std::string>& stringlist
|
|||||||
// This one is for processing of supplemental chanvars
|
// This one is for processing of supplemental chanvars
|
||||||
void BaseCDR::process_channel_variables(const std::list<std::string>& stringlist, const std::list<std::string>& fixedlist, switch_channel_t *channel,bool repeat)
|
void BaseCDR::process_channel_variables(const std::list<std::string>& stringlist, const std::list<std::string>& fixedlist, switch_channel_t *channel,bool repeat)
|
||||||
{
|
{
|
||||||
if(stringlist.front() == "*")
|
if(stringlist.front() == "*") {
|
||||||
{
|
switch_event_header_t *hi;
|
||||||
switch_hash_index_t *hi;
|
|
||||||
void *val;
|
|
||||||
const void *var;
|
|
||||||
switch_memory_pool_t *sessionpool;
|
switch_memory_pool_t *sessionpool;
|
||||||
sessionpool = switch_core_session_get_pool(coresession);
|
sessionpool = switch_core_session_get_pool(coresession);
|
||||||
for (hi = switch_channel_variable_first(channel); hi; hi = switch_hash_next(hi))
|
|
||||||
{
|
if ((hi = switch_channel_variable_first(channel))) {
|
||||||
switch_hash_this(hi, &var, 0, &val);
|
for (; hi; hi = hi->next) {
|
||||||
std::string tempstring_first, tempstring_second;
|
std::string name, value;
|
||||||
tempstring_first = (char *) var;
|
name = hi->name;
|
||||||
tempstring_second = (char *) val;
|
value = hi->value;
|
||||||
chanvars_supp[tempstring_first] = tempstring_second;
|
|
||||||
|
chanvars_supp[name] = value;
|
||||||
}
|
}
|
||||||
switch_channel_variable_last(channel);
|
switch_channel_variable_last(channel);
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
std::list<std::string>::const_iterator iItr,iEnd;
|
std::list<std::string>::const_iterator iItr,iEnd;
|
||||||
iEnd = stringlist.end();
|
iEnd = stringlist.end();
|
||||||
|
|
||||||
for(iItr = stringlist.begin(); iItr != iEnd; iItr++)
|
for (iItr = stringlist.begin(); iItr != iEnd; iItr++) {
|
||||||
{
|
|
||||||
std::vector<char> tempstringvector(iItr->begin(), iItr->end());
|
std::vector<char> tempstringvector(iItr->begin(), iItr->end());
|
||||||
tempstringvector.push_back('\0');
|
tempstringvector.push_back('\0');
|
||||||
char* tempstring= &tempstringvector[0];
|
char* tempstring= &tempstringvector[0];
|
||||||
@ -361,12 +357,10 @@ void BaseCDR::process_channel_variables(const std::list<std::string>& stringlist
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!repeat)
|
if (!repeat) {
|
||||||
{
|
|
||||||
std::map<std::string,std::string>::iterator MapItr;
|
std::map<std::string,std::string>::iterator MapItr;
|
||||||
std::list<std::string>::const_iterator iItr,iEnd;
|
std::list<std::string>::const_iterator iItr,iEnd;
|
||||||
for(iItr = fixedlist.begin(), iEnd = fixedlist.end(); iItr != iEnd; iItr++)
|
for (iItr = fixedlist.begin(), iEnd = fixedlist.end(); iItr != iEnd; iItr++) {
|
||||||
{
|
|
||||||
MapItr = chanvars_supp.find(*iItr);
|
MapItr = chanvars_supp.find(*iItr);
|
||||||
if (MapItr != chanvars_supp.end() )
|
if (MapItr != chanvars_supp.end() )
|
||||||
chanvars_supp.erase(MapItr);
|
chanvars_supp.erase(MapItr);
|
||||||
|
@ -64,7 +64,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address)
|
|||||||
char *next, *cur;
|
char *next, *cur;
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
uint8_t custom = 0;
|
uint8_t custom = 0;
|
||||||
switch_ssize_t hlen = SWITCH_HASH_KEY_STRING;
|
switch_ssize_t hlen = -1;
|
||||||
|
|
||||||
gethostname(globals.hostname, sizeof(globals.hostname));
|
gethostname(globals.hostname, sizeof(globals.hostname));
|
||||||
globals.host_hash = switch_hashfunc_default(globals.hostname, &hlen);
|
globals.host_hash = switch_hashfunc_default(globals.hostname, &hlen);
|
||||||
@ -107,7 +107,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (custom) {
|
if (custom) {
|
||||||
switch_core_hash_insert_dup(globals.event_hash, cur, MARKER);
|
switch_core_hash_insert(globals.event_hash, cur, MARKER);
|
||||||
} else if (switch_name_event(cur, &type) == SWITCH_STATUS_SUCCESS) {
|
} else if (switch_name_event(cur, &type) == SWITCH_STATUS_SUCCESS) {
|
||||||
globals.key_count++;
|
globals.key_count++;
|
||||||
if (type == SWITCH_EVENT_ALL) {
|
if (type == SWITCH_EVENT_ALL) {
|
||||||
|
@ -166,6 +166,7 @@ void WINAPI ServiceCtrlHandler(DWORD control)
|
|||||||
/* the main service entry point */
|
/* the main service entry point */
|
||||||
void WINAPI service_main(DWORD numArgs, char **args)
|
void WINAPI service_main(DWORD numArgs, char **args)
|
||||||
{
|
{
|
||||||
|
switch_core_flag_t flags = SCF_USE_SQL;
|
||||||
const char *err = NULL; /* error value for return from freeswitch initialization */
|
const char *err = NULL; /* error value for return from freeswitch initialization */
|
||||||
/* we have to initialize the service-specific stuff */
|
/* we have to initialize the service-specific stuff */
|
||||||
memset(&status, 0, sizeof(SERVICE_STATUS));
|
memset(&status, 0, sizeof(SERVICE_STATUS));
|
||||||
@ -183,7 +184,7 @@ void WINAPI service_main(DWORD numArgs, char **args)
|
|||||||
set_high_priority();
|
set_high_priority();
|
||||||
|
|
||||||
/* attempt to initialize freeswitch and load modules */
|
/* attempt to initialize freeswitch and load modules */
|
||||||
if (switch_core_init_and_modload(lfile, &err) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_init_and_modload(lfile, flags, &err) != SWITCH_STATUS_SUCCESS) {
|
||||||
/* freeswitch did not start sucessfully */
|
/* freeswitch did not start sucessfully */
|
||||||
status.dwCurrentState = SERVICE_STOPPED;
|
status.dwCurrentState = SERVICE_STOPPED;
|
||||||
} else {
|
} else {
|
||||||
|
@ -349,8 +349,6 @@ SWITCH_DECLARE(void) switch_channel_variable_last(switch_channel_t *channel)
|
|||||||
|
|
||||||
SWITCH_DECLARE(switch_event_header_t *) switch_channel_variable_first(switch_channel_t *channel)
|
SWITCH_DECLARE(switch_event_header_t *) switch_channel_variable_first(switch_channel_t *channel)
|
||||||
{
|
{
|
||||||
switch_event_header_t *hi;
|
|
||||||
|
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
if (channel->vi) {
|
if (channel->vi) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -360,8 +358,6 @@ SWITCH_DECLARE(switch_event_header_t *) switch_channel_variable_first(switch_cha
|
|||||||
channel->vi = 1;
|
channel->vi = 1;
|
||||||
return channel->variables->headers;
|
return channel->variables->headers;
|
||||||
|
|
||||||
return hi;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_channel_set_private(switch_channel_t *channel, const char *key, const void *private_info)
|
SWITCH_DECLARE(switch_status_t) switch_channel_set_private(switch_channel_t *channel, const char *key, const void *private_info)
|
||||||
|
@ -66,7 +66,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t **hash)
|
|||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t * hash, const char *key, const void *data)
|
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t * hash, const char *key, const void *data)
|
||||||
{
|
{
|
||||||
sqlite3HashInsert(&hash->table, key, strlen(key)+1, (void *)data);
|
sqlite3HashInsert(&hash->table, key, (int)strlen(key)+1, (void *)data);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_locked(switch_hash_t * h
|
|||||||
switch_mutex_lock(mutex);
|
switch_mutex_lock(mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite3HashInsert(&hash->table, key, strlen(key)+1, (void *)data);
|
sqlite3HashInsert(&hash->table, key, (int)strlen(key)+1, (void *)data);
|
||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
@ -87,7 +87,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_locked(switch_hash_t * h
|
|||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t * hash, const char *key)
|
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t * hash, const char *key)
|
||||||
{
|
{
|
||||||
sqlite3HashInsert(&hash->table, key, strlen(key)+1, NULL);
|
sqlite3HashInsert(&hash->table, key, (int)strlen(key)+1, NULL);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete_locked(switch_hash_t * h
|
|||||||
switch_mutex_lock(mutex);
|
switch_mutex_lock(mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite3HashInsert(&hash->table, key, strlen(key)+1, NULL);
|
sqlite3HashInsert(&hash->table, key, (int)strlen(key)+1, NULL);
|
||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
@ -109,7 +109,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete_locked(switch_hash_t * h
|
|||||||
|
|
||||||
SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t * hash, const char *key)
|
SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t * hash, const char *key)
|
||||||
{
|
{
|
||||||
return sqlite3HashFind(&hash->table, key, strlen(key)+1);
|
return sqlite3HashFind(&hash->table, key, (int)strlen(key)+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(void *) switch_core_hash_find_locked(switch_hash_t * hash, const char *key, switch_mutex_t *mutex)
|
SWITCH_DECLARE(void *) switch_core_hash_find_locked(switch_hash_t * hash, const char *key, switch_mutex_t *mutex)
|
||||||
@ -120,7 +120,7 @@ SWITCH_DECLARE(void *) switch_core_hash_find_locked(switch_hash_t * hash, const
|
|||||||
switch_mutex_lock(mutex);
|
switch_mutex_lock(mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
val = sqlite3HashFind(&hash->table, key, strlen(key)+1);
|
val = sqlite3HashFind(&hash->table, key, (int)strlen(key)+1);
|
||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user