Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- 12151 discussions
25 Sep '07
Author: mikej
Date: Mon Sep 24 21:22:32 2007
New Revision: 5752
Modified:
freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp
Log:
fix build broken in in r5751
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp Mon Sep 24 21:22:32 2007
@@ -333,7 +333,7 @@
const void *var;
switch_memory_pool_t *sessionpool;
sessionpool = switch_core_session_get_pool(coresession);
- for (hi = switch_channel_variable_first(channel,sessionpool); hi; hi = switch_hash_next(hi))
+ for (hi = switch_channel_variable_first(channel); hi; hi = switch_hash_next(hi))
{
switch_hash_this(hi, &var, 0, &val);
std::string tempstring_first, tempstring_second;
1
0
24 Sep '07
Author: anthm
Date: Mon Sep 24 15:34:25 2007
New Revision: 5751
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core_session.c
freeswitch/trunk/src/switch_ivr.c
freeswitch/trunk/src/switch_ivr_originate.c
freeswitch/trunk/src/switch_loadable_module.c
Log:
fix some races and alter core (do a full rebuild)
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Mon Sep 24 15:34:25 2007
@@ -227,7 +227,7 @@
* pool is NULL, then an internal, non-thread-safe iterator is used.
* @remark Use switch_hash_next and switch_hash_this with this function to iterate all the channel variables
*/
-SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool);
+SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel);
SWITCH_DECLARE(void) switch_channel_variable_last(switch_channel_t *channel);
/*!
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Mon Sep 24 15:34:25 2007
@@ -200,12 +200,11 @@
/*!
\brief Retrieve the list of loaded codecs into an array
- \param pool the memory pool to use for the hash index
\param array the array to populate
\param arraylen the max size in elements of the array
\return the number of elements added to the array
*/
-SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array, int arraylen);
+SWITCH_DECLARE(int) switch_loadable_module_get_codecs(const switch_codec_implementation_t **array, int arraylen);
/*!
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Mon Sep 24 15:34:25 2007
@@ -2822,7 +2822,7 @@
}
if (conference == NULL) {
- for (hi = switch_hash_first(globals.conference_pool, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
conference = (conference_obj_t *) val;
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c Mon Sep 24 15:34:25 2007
@@ -586,7 +586,7 @@
void *vval;
const void *vvar;
- if ((hi = switch_channel_variable_first(channel, switch_core_session_get_pool(session)))) {
+ if ((hi = switch_channel_variable_first(channel))) {
for (; hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
if (vvar && !strncmp(vvar, "enum_", 5)) {
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Mon Sep 24 15:34:25 2007
@@ -252,7 +252,7 @@
stream.write_function(&stream, "%s=%s&", prof_names[x], encode_buf);
}
- if ((hi = switch_channel_variable_first(channel, switch_core_session_get_pool(session)))) {
+ if ((hi = switch_channel_variable_first(channel))) {
for (; hi; hi = switch_hash_next(hi)) {
void *val;
const void *var;
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Mon Sep 24 15:34:25 2007
@@ -477,7 +477,7 @@
sql = switch_mprintf("select sub_from, sub_to,'%q','%q','%q','%q' from jabber_subscriptions where sub_to like '%%%q'", type, rpid, status, proto, from);
- for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
@@ -572,7 +572,7 @@
sql = switch_mprintf("select *,'%q' from jabber_subscriptions", status ? status : "");
}
- for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
@@ -642,7 +642,7 @@
sql = switch_mprintf("select * from jabber_subscriptions");
- for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
@@ -760,7 +760,7 @@
return 0;
}
} else if (((tech_pvt->num_codecs =
- switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), tech_pvt->codecs, SWITCH_MAX_CODECS))) <= 0) {
+ switch_loadable_module_get_codecs(tech_pvt->codecs, SWITCH_MAX_CODECS))) <= 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
return 0;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Mon Sep 24 15:34:25 2007
@@ -230,7 +230,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
return SWITCH_STATUS_GENERR;
}
- } else if (((num_codecs = switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), codecs, SWITCH_MAX_CODECS))) <= 0) {
+ } else if (((num_codecs = switch_loadable_module_get_codecs(codecs, SWITCH_MAX_CODECS))) <= 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO codecs?\n");
return SWITCH_STATUS_GENERR;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Sep 24 15:34:25 2007
@@ -1090,7 +1090,7 @@
stream->write_function(stream, "%25s\t%s\t %32s\t%s\n", "Name", " Type", "Data", "State");
stream->write_function(stream, "%s\n", line);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(switch_hash_pool_get(mod_sofia_globals.profile_hash), mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Mon Sep 24 15:34:25 2007
@@ -264,7 +264,7 @@
}
} else {
tech_pvt->num_codecs =
- switch_loadable_module_get_codecs(switch_core_session_get_pool(tech_pvt->session), tech_pvt->codecs,
+ switch_loadable_module_get_codecs(tech_pvt->codecs,
sizeof(tech_pvt->codecs) / sizeof(tech_pvt->codecs[0]));
}
@@ -574,7 +574,7 @@
}
SWITCH_STANDARD_STREAM(stream);
- if ((hi = switch_channel_variable_first(channel, switch_core_session_get_pool(tech_pvt->session)))) {
+ if ((hi = switch_channel_variable_first(channel))) {
for (; hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
if (vvar && vval) {
@@ -1540,14 +1540,14 @@
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(switch_hash_pool_get(mod_sofia_globals.profile_hash), mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
this_profile = (sofia_profile_t *) vval;
if (this_profile == profile) {
switch_core_hash_delete(mod_sofia_globals.profile_hash, vvar);
}
}
- for (hi = switch_hash_first(switch_hash_pool_get(mod_sofia_globals.gateway_hash), mod_sofia_globals.gateway_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, mod_sofia_globals.gateway_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
this_gateway = (sofia_gateway_t *) vval;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Mon Sep 24 15:34:25 2007
@@ -116,7 +116,7 @@
if ((sql = switch_mprintf("select 0,'unavailable','unavailable',* from sip_subscriptions where event='presence'"))) {
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(switch_hash_pool_get(mod_sofia_globals.profile_hash), mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (sofia_profile_t *) val;
if (!(profile->pflags & PFLAG_PRESENCE)) {
@@ -294,7 +294,7 @@
assert(sql != NULL);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(switch_hash_pool_get(mod_sofia_globals.profile_hash), mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (sofia_profile_t *) val;
if (!(profile->pflags & PFLAG_PRESENCE)) {
@@ -396,7 +396,7 @@
}
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(switch_hash_pool_get(mod_sofia_globals.profile_hash), mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (sofia_profile_t *) val;
if (!(profile->pflags & PFLAG_PRESENCE)) {
Modified: freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c Mon Sep 24 15:34:25 2007
@@ -144,7 +144,7 @@
switch_file_interface_t *file_interface;
const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
- uint32_t num_codecs = switch_loadable_module_get_codecs(NULL, codecs, sizeof(codecs) / sizeof(codecs[0]));
+ uint32_t num_codecs = switch_loadable_module_get_codecs(codecs, sizeof(codecs) / sizeof(codecs[0]));
uint32_t x;
for (x = 0; x < num_codecs; x++) {
Modified: freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.c Mon Sep 24 15:34:25 2007
@@ -142,7 +142,7 @@
/* Finally, go through and initialise each plugin before returning SUCCESS */
switch_hash_index_t *p = NULL;
- for (p = switch_hash_first(mono_pool, globals.plugins); p; p = switch_hash_next(p)) {
+ for (p = switch_hash_first(NULL, globals.plugins); p; p = switch_hash_next(p)) {
mono_plugin *plugin = (mono_plugin *) switch_core_alloc(mono_pool, sizeof(*plugin));
switch_ssize_t *key_length = NULL;
const void *key = NULL;
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Mon Sep 24 15:34:25 2007
@@ -342,15 +342,17 @@
}
}
-SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool)
+SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel)
{
switch_hash_index_t *hi;
assert(channel != NULL);
- if ((hi = switch_hash_first(pool, channel->variables))) {
- switch_mutex_lock(channel->profile_mutex);
+ switch_mutex_lock(channel->profile_mutex);
+ if ((hi = switch_hash_first(NULL, channel->variables))) {
channel->vi = 1;
+ } else {
+ switch_mutex_unlock(channel->profile_mutex);
}
return hi;
@@ -818,7 +820,7 @@
}
/* Index Variables */
- for (hi = switch_hash_first(switch_core_session_get_pool(channel->session), channel->variables); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, channel->variables); hi; hi = switch_hash_next(hi)) {
char buf[1024];
switch_hash_this(hi, &var, NULL, &val);
if (var && val) {
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Mon Sep 24 15:34:25 2007
@@ -81,7 +81,7 @@
uint32_t loops = 0;
switch_mutex_lock(session_manager.session_table_mutex);
- for (hi = switch_hash_first(session_manager.memory_pool, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
if (val) {
session = (switch_core_session_t *) val;
@@ -388,10 +388,6 @@
assert(session != NULL);
- if (!session->message_queue) {
- switch_queue_create(&session->message_queue, SWITCH_MESSAGE_QUEUE_LEN, session->pool);
- }
-
if (session->message_queue) {
if (switch_queue_trypush(session->message_queue, message) == SWITCH_STATUS_SUCCESS) {
status = SWITCH_STATUS_SUCCESS;
@@ -477,10 +473,6 @@
assert(session != NULL);
- if (!session->event_queue) {
- switch_queue_create(&session->event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
- }
-
if (session->event_queue) {
if (switch_queue_trypush(session->event_queue, *event) == SWITCH_STATUS_SUCCESS) {
*event = NULL;
@@ -522,10 +514,6 @@
assert(session != NULL);
- if (!session->private_event_queue) {
- switch_queue_create(&session->private_event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
- }
-
if (session->private_event_queue) {
(*event)->event_id = SWITCH_EVENT_PRIVATE_COMMAND;
if (switch_queue_trypush(session->private_event_queue, *event) == SWITCH_STATUS_SUCCESS) {
@@ -818,6 +806,9 @@
switch_thread_rwlock_create(&session->bug_rwlock, session->pool);
switch_thread_cond_create(&session->cond, session->pool);
switch_thread_rwlock_create(&session->rwlock, session->pool);
+ switch_queue_create(&session->message_queue, SWITCH_MESSAGE_QUEUE_LEN, session->pool);
+ switch_queue_create(&session->event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
+ switch_queue_create(&session->private_event_queue, SWITCH_EVENT_QUEUE_LEN, session->pool);
snprintf(session->name, sizeof(session->name), "%"SWITCH_SIZE_T_FMT, session->id);
switch_mutex_lock(session_manager.session_table_mutex);
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Mon Sep 24 15:34:25 2007
@@ -967,7 +967,7 @@
void *vval;
const void *vvar;
- if ((hi = switch_channel_variable_first(chana, switch_core_session_get_pool(sessa)))) {
+ if ((hi = switch_channel_variable_first(chana))) {
for (; hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
if (vvar && vval && (!prefix || (var && !strncmp((char *) vvar, var, strlen(var))))) {
@@ -1330,7 +1330,7 @@
}
}
- if (((hi = switch_channel_variable_first(channel, switch_core_session_get_pool(session))))) {
+ if (((hi = switch_channel_variable_first(channel)))) {
for (; hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
if (vvar && vval) {
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Mon Sep 24 15:34:25 2007
@@ -323,7 +323,7 @@
assert(caller_channel != NULL);
/* Copy all the channel variables into the event */
- if ((hi = switch_channel_variable_first(caller_channel, switch_core_session_get_pool(session)))) {
+ if ((hi = switch_channel_variable_first(caller_channel))) {
for (; hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, &vvar, NULL, &vval);
if (vvar && vval) {
Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c (original)
+++ freeswitch/trunk/src/switch_loadable_module.c Mon Sep 24 15:34:25 2007
@@ -108,7 +108,7 @@
switch_loadable_module_t *module;
switch_mutex_lock(loadable_modules.mutex);
- for (hi = switch_hash_first(loadable_modules.pool, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
module = (switch_loadable_module_t *) val;
@@ -1078,7 +1078,7 @@
void *val;
switch_loadable_module_t *module;
- for (hi = switch_hash_first(loadable_modules.pool, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
module = (switch_loadable_module_t *) val;
do_shutdown(module);
@@ -1174,7 +1174,7 @@
return switch_core_hash_find_locked(loadable_modules.management_hash, relative_oid, loadable_modules.mutex);
}
-SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array, int arraylen)
+SWITCH_DECLARE(int) switch_loadable_module_get_codecs(const switch_codec_implementation_t **array, int arraylen)
{
switch_hash_index_t *hi;
void *val;
@@ -1183,7 +1183,7 @@
const switch_codec_implementation_t *imp;
switch_mutex_lock(loadable_modules.mutex);
- for (hi = switch_hash_first(pool, loadable_modules.codec_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_hash_first(NULL, loadable_modules.codec_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
codec_interface = (switch_codec_interface_t *) val;
/* Look for a 20ms implementation because it's the safest choice */
1
0
Author: anthm
Date: Mon Sep 24 12:56:40 2007
New Revision: 5750
Modified:
freeswitch/trunk/src/switch_channel.c
Log:
fix for FSCORE-51 (maybe 2)
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Mon Sep 24 12:56:40 2007
@@ -360,7 +360,7 @@
{
assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex);
- switch_core_hash_insert_dup_locked(channel->private_hash, switch_core_session_strdup(channel->session, key), private_info, channel->flag_mutex);
+ switch_core_hash_insert_dup_locked(channel->private_hash, switch_core_session_strdup(channel->session, key), private_info, channel->profile_mutex);
switch_mutex_unlock(channel->profile_mutex);
return SWITCH_STATUS_SUCCESS;
}
@@ -398,15 +398,13 @@
{
assert(channel != NULL);
- if (varname) {
+ if (!switch_strlen_zero(varname)) {
switch_mutex_lock(channel->profile_mutex);
- switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
+ switch_core_hash_delete(channel->variables, varname);
if (!switch_strlen_zero(value)) {
- switch_core_hash_insert_dup_locked(channel->variables, varname,
- switch_clean_string(switch_core_session_strdup(channel->session, value)), channel->flag_mutex);
- } else {
- switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
- }
+ switch_core_hash_insert_dup(channel->variables, varname,
+ switch_clean_string(switch_core_session_strdup(channel->session, value)));
+ }
switch_mutex_unlock(channel->profile_mutex);
return SWITCH_STATUS_SUCCESS;
}
@@ -418,14 +416,12 @@
{
assert(channel != NULL);
- if (varname) {
+ if (!switch_strlen_zero(varname)) {
switch_mutex_lock(channel->profile_mutex);
- switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
+ switch_core_hash_delete(channel->variables, varname);
if (!switch_strlen_zero(value)) {
- switch_core_hash_insert_dup_locked(channel->variables, varname, value, channel->flag_mutex);
- } else {
- switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
- }
+ switch_core_hash_insert_dup(channel->variables, varname, value);
+ }
switch_mutex_unlock(channel->profile_mutex);
return SWITCH_STATUS_SUCCESS;
}
1
0
Author: anthm
Date: Mon Sep 24 12:10:12 2007
New Revision: 5749
Modified:
freeswitch/trunk/src/switch_channel.c
Log:
fix for FSCORE-51 (maybe)
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Mon Sep 24 12:10:12 2007
@@ -360,7 +360,7 @@
{
assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex);
- switch_core_hash_insert_dup(channel->private_hash, switch_core_session_strdup(channel->session, key), private_info);
+ switch_core_hash_insert_dup_locked(channel->private_hash, switch_core_session_strdup(channel->session, key), private_info, channel->flag_mutex);
switch_mutex_unlock(channel->profile_mutex);
return SWITCH_STATUS_SUCCESS;
}
@@ -400,11 +400,12 @@
if (varname) {
switch_mutex_lock(channel->profile_mutex);
- switch_core_hash_delete(channel->variables, varname);
+ switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
if (!switch_strlen_zero(value)) {
- switch_core_hash_insert_dup(channel->variables, varname, switch_clean_string(switch_core_session_strdup(channel->session, value)));
+ switch_core_hash_insert_dup_locked(channel->variables, varname,
+ switch_clean_string(switch_core_session_strdup(channel->session, value)), channel->flag_mutex);
} else {
- switch_core_hash_delete(channel->variables, varname);
+ switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
}
switch_mutex_unlock(channel->profile_mutex);
return SWITCH_STATUS_SUCCESS;
@@ -419,11 +420,11 @@
if (varname) {
switch_mutex_lock(channel->profile_mutex);
- switch_core_hash_delete(channel->variables, varname);
+ switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
if (!switch_strlen_zero(value)) {
- switch_core_hash_insert_dup(channel->variables, varname, value);
+ switch_core_hash_insert_dup_locked(channel->variables, varname, value, channel->flag_mutex);
} else {
- switch_core_hash_delete(channel->variables, varname);
+ switch_core_hash_delete_locked(channel->variables, varname, channel->flag_mutex);
}
switch_mutex_unlock(channel->profile_mutex);
return SWITCH_STATUS_SUCCESS;
1
0
Author: anthm
Date: Mon Sep 24 11:52:32 2007
New Revision: 5748
Modified:
freeswitch/trunk/src/switch_buffer.c
freeswitch/trunk/src/switch_ivr_play_say.c
Log:
fix initialized struct
Modified: freeswitch/trunk/src/switch_buffer.c
==============================================================================
--- freeswitch/trunk/src/switch_buffer.c (original)
+++ freeswitch/trunk/src/switch_buffer.c Mon Sep 24 11:52:32 2007
@@ -157,13 +157,15 @@
{
switch_size_t len;
if ((len = switch_buffer_read(buffer, data, datalen)) == 0) {
+ if (buffer->loops >= 0) {
+ buffer->loops--;
+ }
if (buffer->loops == 0) {
return 0;
}
buffer->head = buffer->data;
buffer->used = buffer->actually_used;
len = switch_buffer_read(buffer, data, datalen);
- buffer->loops--;
}
return len;
}
Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c (original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c Mon Sep 24 11:52:32 2007
@@ -504,8 +504,8 @@
teletone_generation_session_t ts;
switch_buffer_t *audio_buffer;
switch_frame_t *read_frame = NULL;
- switch_codec_t *read_codec = NULL, write_codec;
- switch_frame_t write_frame;
+ switch_codec_t *read_codec = NULL, write_codec = { 0 };
+ switch_frame_t write_frame = { 0 };
switch_byte_t data[1024];
switch_channel_t *channel;
@@ -516,7 +516,7 @@
switch_channel_pre_answer(channel);
read_codec = switch_core_session_get_read_codec(session);
-
+
if (switch_core_codec_init(&write_codec,
"L16",
NULL,
@@ -527,14 +527,14 @@
return SWITCH_STATUS_FALSE;
}
-
+ memset(&ts, 0, sizeof(ts));
write_frame.codec = &write_codec;
write_frame.data = data;
switch_buffer_create_dynamic(&audio_buffer, 512, 1024, 0);
teletone_init_session(&ts, 0, teletone_handler, audio_buffer);
ts.rate = read_codec->implementation->samples_per_second;
-
+ ts.channels = 1;
teletone_run(&ts, script);
if (loops) {
@@ -570,7 +570,7 @@
}
write_frame.samples = write_frame.datalen / 2;
-
+
if (switch_core_session_write_frame(session, &write_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
break;
}
1
0
[commit] r5747 - in freeswitch/trunk: libs/portaudio/build/msvc src/mod/endpoints/mod_portaudio src/mod/endpoints/mod_sofia
by Freeswitch SVN 24 Sep '07
by Freeswitch SVN 24 Sep '07
24 Sep '07
Author: mikej
Date: Mon Sep 24 10:30:01 2007
New Revision: 5747
Modified:
freeswitch/trunk/libs/portaudio/build/msvc/portaudio.vcproj
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
Log:
an attempt at fixing FSCORE-50
Modified: freeswitch/trunk/libs/portaudio/build/msvc/portaudio.vcproj
==============================================================================
--- freeswitch/trunk/libs/portaudio/build/msvc/portaudio.vcproj (original)
+++ freeswitch/trunk/libs/portaudio/build/msvc/portaudio.vcproj Mon Sep 24 10:30:01 2007
@@ -49,8 +49,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="0"
+ InlineFunctionExpansion="0"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\"
PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_DS"
StringPooling="true"
@@ -96,10 +96,10 @@
/>
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="2"
+ ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
@@ -118,82 +118,66 @@
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\Release_x86/portaudio.tlb"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="0"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\"
- PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
+ PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_DS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
ObjectFile="$(PlatformName)\$(ConfigurationName)\"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
WarningLevel="3"
SuppressStartupBanner="true"
+ DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLinkerTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- ModuleDefinitionFile=".\portaudio.def"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
- ImportLibrary="$(PlatformName)\$(ConfigurationName)/portaudio_x64.lib"
- TargetMachine="17"
+ Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
- Name="VCManifestTool"
- />
- <Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.bsc"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
- Name="Debug|Win32"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="4"
+ Name="Debug DirectSound|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
@@ -223,7 +207,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\"
- PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PA_NO_ASIO;PA_NO_DS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -247,12 +231,23 @@
Name="VCPreLinkEventTool"
/>
<Tool
- Name="VCLibrarianTool"
+ Name="VCLinkerTool"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\portaudio.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
+ Name="VCManifestTool"
+ />
+ <Tool
Name="VCXDCMakeTool"
/>
<Tool
@@ -264,13 +259,19 @@
Name="VCFxCopTool"
/>
<Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ Name="Release DirectSound|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -290,35 +291,35 @@
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\Debug_x86/portaudio.tlb"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="2"
+ InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\"
- PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
+ PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
ObjectFile="$(PlatformName)\$(ConfigurationName)\"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
WarningLevel="3"
SuppressStartupBanner="true"
- DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
@@ -326,14 +327,13 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
- LinkIncremental="2"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
+ LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\portaudio.def"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x64.lib"
- TargetMachine="17"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -347,7 +347,7 @@
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
- OutputFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.bsc"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
@@ -363,9 +363,9 @@
/>
</Configuration>
<Configuration
- Name="Debug DirectSound|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -385,35 +385,35 @@
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Debug_x86/portaudio.tlb"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="2"
+ InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\"
- PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
+ PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
ObjectFile="$(PlatformName)\$(ConfigurationName)\"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
WarningLevel="3"
SuppressStartupBanner="true"
- DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
+ PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
@@ -421,14 +421,13 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
- LinkIncremental="2"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
+ LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\portaudio.def"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
- TargetMachine="1"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)/portaudio_x64.lib"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
@@ -442,7 +441,7 @@
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.bsc"
/>
<Tool
Name="VCFxCopTool"
@@ -458,7 +457,7 @@
/>
</Configuration>
<Configuration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -553,9 +552,9 @@
/>
</Configuration>
<Configuration
- Name="Release DirectSound|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
+ Name="Debug DirectSound|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
@@ -575,35 +574,35 @@
/>
<Tool
Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release_x86/portaudio.tlb"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="0"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\"
- PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
+ PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
ObjectFile="$(PlatformName)\$(ConfigurationName)\"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
WarningLevel="3"
SuppressStartupBanner="true"
+ DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
+ PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
@@ -611,13 +610,14 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
- LinkIncremental="1"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
+ LinkIncremental="2"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\portaudio.def"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
- TargetMachine="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x64.lib"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
@@ -631,7 +631,7 @@
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.bsc"
/>
<Tool
Name="VCFxCopTool"
@@ -764,7 +764,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -773,7 +773,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -782,7 +782,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -791,7 +791,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -800,7 +800,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -809,7 +809,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -840,7 +840,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -849,7 +849,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -858,7 +858,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -867,7 +867,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -876,7 +876,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -885,7 +885,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -916,7 +916,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -925,7 +925,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -934,7 +934,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -943,7 +943,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -952,7 +952,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -961,7 +961,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -992,7 +992,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1001,7 +1001,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1010,7 +1010,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1019,7 +1019,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1028,7 +1028,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1037,7 +1037,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1068,7 +1068,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1077,7 +1077,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1086,7 +1086,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1095,7 +1095,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1104,7 +1104,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1113,7 +1113,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1144,7 +1144,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1153,7 +1153,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1162,7 +1162,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1171,7 +1171,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1180,7 +1180,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1189,7 +1189,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1220,7 +1220,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1229,7 +1229,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1238,7 +1238,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1247,7 +1247,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1256,7 +1256,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1265,7 +1265,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1296,7 +1296,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1305,7 +1305,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1314,7 +1314,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1323,7 +1323,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1332,7 +1332,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1341,7 +1341,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1372,7 +1372,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1381,7 +1381,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1390,7 +1390,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1399,7 +1399,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1408,7 +1408,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1417,7 +1417,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1448,7 +1448,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1457,7 +1457,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1466,7 +1466,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1475,7 +1475,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1484,7 +1484,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1493,7 +1493,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1532,7 +1532,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -1541,8 +1542,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1551,7 +1551,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1560,7 +1560,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1569,7 +1569,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1578,7 +1578,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1613,7 +1613,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -1622,8 +1623,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1632,7 +1632,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1641,7 +1641,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1650,7 +1650,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1659,7 +1659,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1691,7 +1691,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -1700,8 +1701,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1710,7 +1710,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1719,7 +1719,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1728,7 +1728,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1737,7 +1737,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1769,7 +1769,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -1778,8 +1779,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1788,7 +1788,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1797,7 +1797,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1806,7 +1806,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1815,7 +1815,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1847,7 +1847,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -1856,8 +1857,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1866,7 +1866,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1875,7 +1875,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1884,7 +1884,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1893,7 +1893,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1925,7 +1925,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -1934,8 +1935,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1944,7 +1944,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1953,7 +1953,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1962,7 +1962,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1971,7 +1971,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2003,7 +2003,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -2012,8 +2013,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2022,7 +2022,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2031,7 +2031,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2040,7 +2040,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2049,7 +2049,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2081,7 +2081,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -2090,8 +2091,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2100,7 +2100,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2109,7 +2109,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2118,7 +2118,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2127,7 +2127,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2164,7 +2164,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -2173,8 +2174,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2183,7 +2183,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2192,7 +2192,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2201,7 +2201,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2210,7 +2210,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2242,7 +2242,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -2251,8 +2252,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2261,7 +2261,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2270,7 +2270,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2279,7 +2279,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2288,7 +2288,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2323,7 +2323,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2332,7 +2332,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2341,7 +2341,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2350,7 +2350,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2359,7 +2359,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2368,7 +2368,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2404,7 +2404,8 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@@ -2413,8 +2414,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2423,7 +2423,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2432,7 +2432,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2441,7 +2441,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2450,7 +2450,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2489,7 +2489,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2498,7 +2498,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2507,7 +2507,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2516,7 +2516,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2525,7 +2525,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2534,7 +2534,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2565,7 +2565,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2574,7 +2574,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2583,7 +2583,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2592,7 +2592,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2601,7 +2601,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2610,7 +2610,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2641,7 +2641,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2650,7 +2650,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2659,7 +2659,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release DirectSound|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -2668,7 +2668,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2677,7 +2677,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug DirectSound|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -2686,7 +2686,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release DirectSound|Win32"
+ Name="Debug DirectSound|x64"
>
<Tool
Name="VCCLCompilerTool"
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_PortAudio.vcproj Mon Sep 24 10:30:01 2007
@@ -127,6 +127,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="0"
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\portaudio\include""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;ALLOW_SMP_DANGERS"
RuntimeLibrary="2"
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj Mon Sep 24 10:30:01 2007
@@ -194,19 +194,36 @@
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
- <File RelativePath=".\mod_sofia.c"></File>
- <File RelativePath=".\sofia_reg.c"></File>
- <File RelativePath=".\sofia_glue.c"></File>
- <File RelativePath=".\sofia_presence.c"></File>
- <File RelativePath=".\sofia.c"></File>
-
+ <File
+ RelativePath=".\mod_sofia.c"
+ >
+ </File>
+ <File
+ RelativePath=".\sofia.c"
+ >
+ </File>
+ <File
+ RelativePath=".\sofia_glue.c"
+ >
+ </File>
+ <File
+ RelativePath=".\sofia_presence.c"
+ >
+ </File>
+ <File
+ RelativePath=".\sofia_reg.c"
+ >
+ </File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
- <File RelativePath=".\mod_sofia.h"></File>
+ <File
+ RelativePath=".\mod_sofia.h"
+ >
+ </File>
</Filter>
<Filter
Name="Resource Files"
1
0
23 Sep '07
Author: anthm
Date: Sun Sep 23 16:08:26 2007
New Revision: 5746
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/switch_xml.c
Log:
cleanup
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Sun Sep 23 16:08:26 2007
@@ -428,9 +428,9 @@
switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
{
- char rpid[1024] = { 0 };
- char alert_info[1024] = { 0 };
- char max_forwards[8] = { 0 };
+ char *rpid = NULL;
+ char *alert_info = NULL;
+ char *max_forwards = NULL;
char *alertbuf;
char *forwardbuf;
int forwardval;
@@ -473,24 +473,18 @@
}
- if (!tech_pvt->from_str) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
- return SWITCH_STATUS_FALSE;
- }
-
+ assert(tech_pvt->from_str != NULL);
-
-
if ((alertbuf = switch_channel_get_variable(channel, "alert_info"))) {
- snprintf(alert_info, sizeof(alert_info) - 1, "Alert-Info: %s", alertbuf);
+ alert_info = switch_core_session_sprintf(tech_pvt->session, "Alert-Info: %s", alertbuf);
}
if ((forwardbuf = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE))) {
forwardval = atoi(forwardbuf) - 1;
- snprintf(max_forwards, sizeof(max_forwards) - 1, "%d", forwardval);
+ switch_core_session_sprintf(tech_pvt->session, "%d", forwardval);
}
- if (sofia_glue_tech_choose_port(tech_pvt) != SWITCH_STATUS_SUCCESS) {
+ if ((status = sofia_glue_tech_choose_port(tech_pvt)) != SWITCH_STATUS_SUCCESS) {
return status;
}
@@ -514,12 +508,23 @@
screen = "yes";
}
- snprintf(rpid, sizeof(rpid) - 1, "Remote-Party-ID: %s;party=calling;screen=%s;privacy=%s", tech_pvt->from_str, screen, priv);
-
+ rpid = switch_core_session_sprintf(tech_pvt->session, "Remote-Party-ID: %s;party=calling;screen=%s;privacy=%s", tech_pvt->from_str, screen, priv);
}
if (!tech_pvt->nh) {
- char *url = sofia_glue_get_url_from_contact(tech_pvt->dest, 1);
+ char *d_url = NULL, *url = NULL;
+
+ if (switch_strlen_zero(tech_pvt->dest)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "URL Error! [%s]\n", tech_pvt->dest);
+ return SWITCH_STATUS_FALSE;
+ }
+
+ if ((d_url = sofia_glue_get_url_from_contact(tech_pvt->dest, 1))) {
+ url = d_url;
+ } else {
+ url = tech_pvt->dest;
+ }
+
tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
NUTAG_URL(url),
SIPTAG_TO_STR(tech_pvt->dest_to),
@@ -528,23 +533,28 @@
TAG_IF(tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->invite_contact)),
TAG_IF(!tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->profile->url)),
TAG_END());
- switch_safe_free(url);
+ switch_safe_free(d_url);
+
if (!(tech_pvt->sofia_private = malloc(sizeof(*tech_pvt->sofia_private)))) {
abort();
}
memset(tech_pvt->sofia_private, 0, sizeof(*tech_pvt->sofia_private));
+
tech_pvt->sofia_private->home = su_home_new(sizeof(*tech_pvt->sofia_private->home));
switch_copy_string(tech_pvt->sofia_private->uuid, switch_core_session_get_uuid(session), sizeof(tech_pvt->sofia_private->uuid));
nua_handle_bind(tech_pvt->nh, tech_pvt->sofia_private);
}
-
- if (tech_pvt->e_dest && (e_dest = strdup(tech_pvt->e_dest))) {
- char *user = e_dest, *host = NULL;
+ if (tech_pvt->e_dest) {
+ char *user = NULL, *host = NULL;
char hash_key[256] = "";
+ e_dest = strdup(tech_pvt->e_dest);
+ assert(e_dest != NULL);
+ user = e_dest;
+
if ((host = strchr(user, '@'))) {
*host++ = '\0';
}
@@ -585,10 +595,10 @@
}
nua_invite(tech_pvt->nh,
- TAG_IF(*rpid != '\0', SIPTAG_HEADER_STR(rpid)),
- TAG_IF(*alert_info != '\0', SIPTAG_HEADER_STR(alert_info)),
+ TAG_IF(!switch_strlen_zero(rpid), SIPTAG_HEADER_STR(rpid)),
+ TAG_IF(!switch_strlen_zero(alert_info), SIPTAG_HEADER_STR(alert_info)),
TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
- TAG_IF(*max_forwards != '\0', SIPTAG_MAX_FORWARDS_STR(max_forwards)),
+ TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)),
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Sun Sep 23 16:08:26 2007
@@ -1516,22 +1516,38 @@
switch_xml_t p = (xml) ? xml->parent : NULL, o = (xml) ? xml->ordered : NULL;
switch_xml_root_t root = (switch_xml_root_t) xml;
switch_size_t len = 0, max = SWITCH_XML_BUFSIZE;
- char *s = strcpy(malloc(max), ""), *t, *n;
+ char *s, *t, *n, *r;
int i, j, k;
uint32_t count = 0;
+
+ s = malloc(max);
+ assert(s != NULL);
+ memset(s, 0, max);
+
+
+ if (!xml || !xml->name) {
+ if (!(r = realloc(s, len + 1))) {
+ abort();
+ }
+ return r;
+ }
- if (!xml || !xml->name)
- return realloc(s, len + 1);
- while (root->xml.parent)
+ while (root->xml.parent) {
root = (switch_xml_root_t) root->xml.parent; // root tag
+ }
for (i = 0; !p && root->pi[i]; i++) { // pre-root processing instructions
for (k = 2; root->pi[i][k - 1]; k++);
for (j = 1; (n = root->pi[i][j]); j++) {
- if (root->pi[i][k][j - 1] == '>')
+ if (root->pi[i][k][j - 1] == '>') {
continue; // not pre-root
- while (len + strlen(t = root->pi[i][0]) + strlen(n) + 7 > max)
- s = realloc(s, max += SWITCH_XML_BUFSIZE);
+ }
+ while (len + strlen(t = root->pi[i][0]) + strlen(n) + 7 > max) {
+ if (!(r = realloc(s, max += SWITCH_XML_BUFSIZE))) {
+ abort();
+ }
+ s = r;
+ }
len += sprintf(s + len, "<?%s%s%s?>", t, *n ? " " : "", n);
}
}
@@ -1544,14 +1560,24 @@
for (i = 0; !p && root->pi[i]; i++) { // post-root processing instructions
for (k = 2; root->pi[i][k - 1]; k++);
for (j = 1; (n = root->pi[i][j]); j++) {
- if (root->pi[i][k][j - 1] == '<')
+ if (root->pi[i][k][j - 1] == '<') {
continue; // not post-root
- while (len + strlen(t = root->pi[i][0]) + strlen(n) + 7 > max)
- s = realloc(s, max += SWITCH_XML_BUFSIZE);
+ }
+ while (len + strlen(t = root->pi[i][0]) + strlen(n) + 7 > max) {
+ if (!(r = realloc(s, max += SWITCH_XML_BUFSIZE))) {
+ abort();
+ }
+ s = r;
+ }
len += sprintf(s + len, "\n<?%s%s%s?>", t, *n ? " " : "", n);
}
}
- return realloc(s, len + 1);
+
+ if (!(r = realloc(s, len + 1))) {
+ abort();
+ }
+
+ return r;
}
// free the memory allocated for the switch_xml structure
1
0
Author: anthm
Date: Sun Sep 23 11:19:04 2007
New Revision: 5745
Modified:
freeswitch/trunk/src/include/switch_apr.h
freeswitch/trunk/src/switch_apr.c
freeswitch/trunk/src/switch_xml.c
Log:
globs on #includes
no leading seperator indicates realitive
to the default conf dir.
examples:
<!--#include "profiles/*"-->
<!--#include "profiles/a*.xml"-->
<!--#include "/tmp/somedir/*"-->
Modified: freeswitch/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_apr.h (original)
+++ freeswitch/trunk/src/include/switch_apr.h Sun Sep 23 11:19:04 2007
@@ -742,6 +742,20 @@
typedef struct switch_dir switch_dir_t;
+struct switch_array_header_t {
+ /** The pool the array is allocated out of */
+ switch_memory_pool_t *pool;
+ /** The amount of memory allocated for each element of the array */
+ int elt_size;
+ /** The number of active elements in the array */
+ int nelts;
+ /** The number of elements allocated in the array */
+ int nalloc;
+ /** The elements in the array */
+ char *elts;
+};
+typedef struct switch_array_header_t switch_array_header_t;
+
SWITCH_DECLARE(switch_status_t) switch_dir_open(switch_dir_t **new_dir, const char *dirname, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_dir_close(switch_dir_t *thedir);
SWITCH_DECLARE(const char *) switch_dir_next_file(switch_dir_t *thedir, char *buf, switch_size_t len);
@@ -1143,6 +1157,8 @@
*/
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t *pool);
+SWITCH_DECLARE(switch_status_t) switch_match_glob(const char *pattern, switch_array_header_t **result, switch_memory_pool_t *p);
+
/** @} */
Modified: freeswitch/trunk/src/switch_apr.c
==============================================================================
--- freeswitch/trunk/src/switch_apr.c (original)
+++ freeswitch/trunk/src/switch_apr.c Sun Sep 23 11:19:04 2007
@@ -53,6 +53,9 @@
#define APR_WANT_STDIO
#define APR_WANT_STRFUNC
#include <apr_want.h>
+#include <apr_file_info.h>
+#include <apr_fnmatch.h>
+#include <apr_tables.h>
/* apr_vformatter_buff_t definition*/
#include <apr_lib.h>
@@ -714,7 +717,12 @@
#endif
}
+SWITCH_DECLARE(switch_status_t) switch_match_glob(const char *pattern, switch_array_header_t **result, switch_memory_pool_t *p)
+{
+ return apr_match_glob(pattern, (apr_array_header_t **)result, p);
+}
+
/* For Emacs:
* Local Variables:
* mode:c
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Sun Sep 23 11:19:04 2007
@@ -68,6 +68,8 @@
#define SWITCH_XML_WS "\t\r\n " // whitespace
#define SWITCH_XML_ERRL 128 // maximum error string length
+static int preprocess(const char *file, int write_fd, int rlevel);
+
typedef struct switch_xml_root *switch_xml_root_t;
struct switch_xml_root { // additional data for the root tag
struct switch_xml xml; // is a super-struct built on top of switch_xml struct
@@ -933,6 +935,57 @@
}
+/* for apr file and directory handling */
+#include <apr_file_io.h>
+
+static int preprocess_glob(const char *pattern, int write_fd, int rlevel)
+{
+
+ switch_array_header_t *result;
+ switch_memory_pool_t *pool;
+ char **list;
+ int i;
+ char *p, *dir_path = NULL;
+
+ switch_core_new_memory_pool(&pool);
+ assert(pool != NULL);
+
+ if (switch_is_file_path(pattern)) {
+ dir_path = switch_core_strdup(pool, pattern);
+ if ((p = strrchr(dir_path, *SWITCH_PATH_SEPARATOR))) {
+ *p = '\0';
+ }
+ } else {
+ dir_path = SWITCH_GLOBAL_dirs.conf_dir;
+ p = switch_core_sprintf(pool, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, pattern);
+ pattern = p;
+ }
+
+ switch_match_glob(pattern, &result, pool);
+
+ list = (char **)result->elts;
+
+ for (i = 0; i < result->nelts; i++) {
+ char *path = list[i];
+
+ if (strcmp(path, ".") && strcmp(path, "..")) {
+ p = switch_core_sprintf(pool, "%s%s%s", dir_path, SWITCH_PATH_SEPARATOR, path);
+ if (preprocess(p, write_fd, rlevel) < 0) {
+ const char *reason = strerror(errno);
+ if (rlevel > 100) {
+ reason = "Maximum recursion limit reached";
+ }
+ fprintf(stderr, "Error including %s (%s)\n", p, reason);
+ }
+ }
+ }
+
+ switch_core_destroy_memory_pool(&pool);
+
+
+ return write_fd;
+}
+
static int preprocess(const char *file, int write_fd, int rlevel)
{
int read_fd = -1;
@@ -1016,17 +1069,8 @@
}
} else if (!strcasecmp(cmd, "include")) {
- char *fme = NULL, *ifile = arg;
-
- if (!switch_is_file_path(ifile)) {
- fme = switch_mprintf("%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, arg);
- ifile = fme;
- }
- if (preprocess(ifile, write_fd, rlevel + 1) < 0) {
- fprintf(stderr, "Error including %s (%s)\n", ifile, strerror(errno));
- }
- switch_safe_free(fme);
- } /* else NO OP */
+ preprocess_glob(arg, write_fd, rlevel + 1);
+ }
}
continue;
1
0
[commit] r5744 - freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket
by Freeswitch SVN 21 Sep '07
by Freeswitch SVN 21 Sep '07
21 Sep '07
Author: mikej
Date: Fri Sep 21 19:16:29 2007
New Revision: 5744
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/ (props changed)
freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.vcproj
Log:
fix for FSBUILD-18
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.vcproj (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_socket/mod_spidermonkey_socket.vcproj Fri Sep 21 19:16:29 2007
@@ -123,7 +123,8 @@
/>
<Tool
Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_SPIDERMONKEY_SOCKET_EXPORTS"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\js\src";"$(InputDir)..\..\..\..\libs\js\nsprpub\pr\include";"$(InputDir)..\mod_spidermonkey""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB;JS_THREADSAFE;MOD_SPIDERMONKEY_SOCKET_EXPORTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
1
0
Author: mikej
Date: Fri Sep 21 18:41:07 2007
New Revision: 5743
Modified:
freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj
Log:
tweak down the optimization on release build due to some buggy optimizations in msvc 2005
Modified: freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj
==============================================================================
--- freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj (original)
+++ freeswitch/trunk/w32/Library/FreeSwitchCore.vcproj Fri Sep 21 18:41:07 2007
@@ -136,6 +136,7 @@
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="0"
AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src;..\..\libs\win32\sqlite;..\..\libs\pcre;..\..\libs\stfu"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;CRASH_PROT;PCRE_STATIC"
RuntimeLibrary="2"
@@ -474,11 +475,11 @@
>
</File>
<File
- RelativePath="..\..\src\include\switch_core.h"
+ RelativePath="..\..\src\include\private\switch_core.h"
>
</File>
<File
- RelativePath="..\..\src\include\private\switch_core.h"
+ RelativePath="..\..\src\include\switch_core.h"
>
</File>
<File
1
0