via: acd6333e33b9ff9e0f1a424cb7dc5e5b1d063b6a (commit)
from: d8b11ce63b908ae893feda5345ed712c9125623a (commit)
= COMMIT LOG ===========================================================
committer: Moises Silva
comments:
freetdm: disallow completely core variables for freetdm outbound variables
diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c
index c0fdaa6..78874de 100755
--- a/libs/freetdm/mod_freetdm/mod_freetdm.c
+++ b/libs/freetdm/mod_freetdm/mod_freetdm.c
@@ -1055,28 +1055,18 @@ switch_io_routines_t freetdm_io_routines = {
static const char* channel_get_variable(switch_core_session_t *session, switch_event_t *var_event, const char *variable_name)
{
const char *variable = NULL;
-
if (var_event) {
if ((variable = switch_event_get_header(var_event, variable_name))) {
return variable;
}
}
+
if (session) {
switch_channel_t *channel = switch_core_session_get_channel(session);
if ((variable = switch_channel_get_variable(channel, variable_name))) {
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;
}
Summary of changes: libs/freetdm/mod_freetdm/mod_freetdm.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-)
this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630
--
FreeSWITCH Source