[Freeswitch-svn] [commit] r6496 - in freeswitch/trunk/src/mod/applications: mod_commands mod_expr
Freeswitch SVN
anthm at freeswitch.org
Tue Dec 4 13:10:05 EST 2007
Author: anthm
Date: Tue Dec 4 13:10:04 2007
New Revision: 6496
Modified:
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/trunk/src/mod/applications/mod_expr/mod_expr.c
Log:
minor tweaks
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Tue Dec 4 13:10:04 2007
@@ -110,6 +110,11 @@
goto end;
}
+
+ if (stream->event && switch_event_get_header(stream->event, "http-host")) {
+ stream->write_function(stream, "Content-Type: text/xml\r\n\r\n");
+ }
+
mydata = strdup(cmd);
assert(mydata);
Modified: freeswitch/trunk/src/mod/applications/mod_expr/mod_expr.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_expr/mod_expr.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_expr/mod_expr.c Tue Dec 4 13:10:04 2007
@@ -51,7 +51,13 @@
int err;
char val[512] = "", *p;
char *m_cmd = NULL;
- size_t len = strlen(cmd) + 3;
+ size_t len;
+
+ if (switch_strlen_zero(cmd)) {
+ goto error;
+ }
+
+ len = strlen(cmd) + 3;
m_cmd = malloc(len);
More information about the Freeswitch-svn
mailing list