git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3226 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-10-29 15:36:23 +00:00
parent 800ec12f5b
commit 082a5a03c0
3 changed files with 30 additions and 11 deletions

View File

@ -136,6 +136,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ F77 = @F77@
FFLAGS = @FFLAGS@ FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -164,12 +165,9 @@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@ WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@
WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@ WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@ ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -186,25 +184,32 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
new_AM_CFLAGS = @new_AM_CFLAGS@ new_AM_CFLAGS = @new_AM_CFLAGS@
new_AM_LDFLAGS = @new_AM_LDFLAGS@ new_AM_LDFLAGS = @new_AM_LDFLAGS@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@

View File

@ -2449,7 +2449,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
char *context; char *context;
char *cid_name; char *cid_name;
char *cid_num; char *cid_num;
char *t, *them = NULL; char *tmp, *t, *them = NULL;
memset(payloads, 0, sizeof(payloads)); memset(payloads, 0, sizeof(payloads));
@ -2481,8 +2481,6 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
} }
} }
if (!(context = ldl_session_get_value(dlsession, "context"))) { if (!(context = ldl_session_get_value(dlsession, "context"))) {
context = profile->context; context = profile->context;
} }
@ -2502,6 +2500,21 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
tech_pvt->them = switch_core_session_strdup(session, ldl_session_get_callee(dlsession)); tech_pvt->them = switch_core_session_strdup(session, ldl_session_get_callee(dlsession));
tech_pvt->us = switch_core_session_strdup(session, ldl_session_get_caller(dlsession)); tech_pvt->us = switch_core_session_strdup(session, ldl_session_get_caller(dlsession));
if ((tmp = strdup(tech_pvt->us))) {
char *p, *q;
if ((p = strchr(tmp, '@'))) {
*p++ = '\0';
if ((q = strchr(p, '/'))) {
*q = '\0';
}
switch_channel_set_variable(channel, "dl_from_user", tmp);
switch_channel_set_variable(channel, "dl_from_host", p);
}
switch_safe_free(tmp);
}
if (!tech_pvt->caller_profile) { if (!tech_pvt->caller_profile) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Creating an identity for %s %s <%s> %s\n", switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Creating an identity for %s %s <%s> %s\n",

View File

@ -1171,7 +1171,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
return in; return in;
} }
} }
nlen = strlen(sub_val); nlen = sub_val ? strlen(sub_val) : 0;
if (len + nlen >= olen) { if (len + nlen >= olen) {
olen += block; olen += block;
cpos = c - data; cpos = c - data;
@ -1186,10 +1186,11 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
vname = data + vvalpos; vname = data + vvalpos;
} }
len += nlen; if (nlen) {
strcat(c, sub_val); len += nlen;
c += nlen; strcat(c, sub_val);
c += nlen;
}
if (func_val) { if (func_val) {
free(func_val); free(func_val);
func_val = NULL; func_val = NULL;