[Freeswitch-svn] [commit] r3458 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Sun Nov 26 15:06:06 EST 2006


Author: anthm
Date: Sun Nov 26 15:06:04 2006
New Revision: 3458

Modified:
   freeswitch/trunk/src/switch_channel.c

Log:
update

Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c	(original)
+++ freeswitch/trunk/src/switch_channel.c	Sun Nov 26 15:06:04 2006
@@ -1196,19 +1196,19 @@
 						return in;
 					}
 				}
-				nlen = sub_val ? strlen(sub_val) : 0;
+				if ((nlen = sub_val ? strlen(sub_val) : 0)) {
+					if (len + nlen >= olen) {
+						olen = (olen + len + nlen + block);
+						cpos = c - data;
+						data = realloc(data, olen);
+						c = data + cpos;
+						memset(c, 0, olen - cpos);
+					}
 
-				if (len + nlen >= olen) {
-					olen = (olen + len + nlen + block);
-					cpos = c - data;
-					data = realloc(data, olen);
-					c = data + cpos;
-					memset(c, 0, olen - cpos);
-				}
-				if (nlen) {
 					len += nlen;
 					strcat(c, sub_val);
 					c += nlen;
+
 				}
 				
 				switch_safe_free(func_val);



More information about the Freeswitch-svn mailing list