[Freeswitch-trunk] [freeswitch] FreeSWITCH Source branch master updated. git2svn-syncpoint-master-1688-g257bf9a
git at svn.freeswitch.org
git at svn.freeswitch.org
Thu Feb 3 01:17:17 MSK 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FreeSWITCH Source".
The branch, master has been updated
via 257bf9a46c44f76d8b38c90f288f364bcf1c6398 (commit)
from 4ae8282e6c6df0e296113e9b4b4a1383e1af8ad7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 257bf9a46c44f76d8b38c90f288f364bcf1c6398
Author: Anthony Minessale <anthm at freeswitch.org>
Date: Wed Feb 2 16:05:51 2011 -0600
fix possible bad pointer in global vars (please test)
diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c
index 970cb5b..2ef21cc 100755
--- a/libs/freetdm/mod_freetdm/mod_freetdm.c
+++ b/libs/freetdm/mod_freetdm/mod_freetdm.c
@@ -1067,9 +1067,16 @@ static const char* channel_get_variable(switch_core_session_t *session, switch_e
return variable;
}
}
+
+
+ // This is unsafe, I don't see anywhere in the whole code where this is called with NULL session anyway.
+ // There is a new switch_core_get_variable_dup that will strdup it for you and then you must free it.
+ // That messes up the abstraction completely so I am just commenting it out for you.....
+ /*
if ((variable = switch_core_get_variable(variable_name))) {
return variable;
}
+ */
return NULL;
}
diff --git a/libs/openzap/mod_openzap/mod_openzap.c b/libs/openzap/mod_openzap/mod_openzap.c
index d52149c..ef346b8 100644
--- a/libs/openzap/mod_openzap/mod_openzap.c
+++ b/libs/openzap/mod_openzap/mod_openzap.c
@@ -1234,19 +1234,19 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
zap_set_string(caller_data.ani.digits, dest);
}
- if ((var = switch_event_get_header(var_event, "openzap_outbound_ton")) || (var = switch_core_get_variable("openzap_outbound_ton"))) {
+ if ((var = switch_event_get_header(var_event, "openzap_outbound_ton"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting TON to: %s\n", var);
zap_set_ton(var, &caller_data.ani.type);
} else {
caller_data.ani.type = outbound_profile->destination_number_ton;
}
- if ((var = switch_event_get_header(var_event, "openzap_custom_call_data")) || (var = switch_core_get_variable("openzap_custom_call_data"))) {
+ if ((var = switch_event_get_header(var_event, "openzap_custom_call_data"))) {
zap_set_string((char *)caller_data.raw_data, var);
caller_data.raw_data_len = strlen(var);
}
- if ((var = switch_event_get_header(var_event, "openzap_outbound_npi")) || (var = switch_core_get_variable("openzap_outbound_npi"))) {
+ if ((var = switch_event_get_header(var_event, "openzap_outbound_npi"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting NPI to: %s\n", var);
zap_set_npi(var, &caller_data.ani.plan);
} else {
-----------------------------------------------------------------------
Summary of changes:
libs/freetdm/mod_freetdm/mod_freetdm.c | 7 +++++++
libs/openzap/mod_openzap/mod_openzap.c | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
hooks/post-receive
--
FreeSWITCH Source
More information about the Freeswitch-trunk
mailing list