[Freeswitch-svn] [commit] r3226 - in freeswitch/trunk: libs/libspeakup src src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Sun Oct 29 10:36:24 EST 2006


Author: anthm
Date: Sun Oct 29 10:36:23 2006
New Revision: 3226

Modified:
   freeswitch/trunk/libs/libspeakup/Makefile.in
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
   freeswitch/trunk/src/switch_channel.c

Log:
update

Modified: freeswitch/trunk/libs/libspeakup/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/libspeakup/Makefile.in	(original)
+++ freeswitch/trunk/libs/libspeakup/Makefile.in	Sun Oct 29 10:36:23 2006
@@ -136,6 +136,7 @@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
+GREP = @GREP@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -164,12 +165,9 @@
 VERSION = @VERSION@
 WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@
 WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@
-ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
 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_TRUE = @am__fastdepCC_TRUE@
 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -186,25 +184,32 @@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 new_AM_CFLAGS = @new_AM_CFLAGS@
 new_AM_LDFLAGS = @new_AM_LDFLAGS@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@

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	Sun Oct 29 10:36:23 2006
@@ -2449,7 +2449,7 @@
 						char *context;
 						char *cid_name;
 						char *cid_num;
-						char *t, *them = NULL;
+						char *tmp, *t, *them = NULL;
 
 						memset(payloads, 0, sizeof(payloads));
 
@@ -2481,8 +2481,6 @@
 							}
 						}
 						
-
-						
 						if (!(context = ldl_session_get_value(dlsession, "context"))) {
 							context = profile->context;
 						}
@@ -2502,6 +2500,21 @@
 			
 						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));
+
+						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) {
 							switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Creating an identity for %s %s <%s> %s\n", 

Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c	(original)
+++ freeswitch/trunk/src/switch_channel.c	Sun Oct 29 10:36:23 2006
@@ -1171,7 +1171,7 @@
 						return in;
 					}
 				}
-				nlen = strlen(sub_val);
+				nlen = sub_val ? strlen(sub_val) : 0;
 				if (len + nlen >= olen) {
 					olen += block;
 					cpos = c - data;
@@ -1186,10 +1186,11 @@
 					vname = data + vvalpos;
 				}
 
-				len += nlen;
-				strcat(c, sub_val);
-				c += nlen;
-
+				if (nlen) {
+					len += nlen;
+					strcat(c, sub_val);
+					c += nlen;
+				}
 				if (func_val) {
 					free(func_val);
 					func_val = NULL;



More information about the Freeswitch-svn mailing list