]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
minor tweaks
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 4 Dec 2007 18:10:04 +0000 (18:10 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 4 Dec 2007 18:10:04 +0000 (18:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6496 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c
src/mod/applications/mod_expr/mod_expr.c

index ebf209dff0c33c8f99bc66b67e42ec4d0a92abe2..073d329958b58a604336bcb374f7b295c1e3a29f 100644 (file)
@@ -110,6 +110,11 @@ SWITCH_STANDARD_API(xml_locate_function)
         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);
        
index ea7f1ed3ef4ccaa1eaadd3e9bb65a54efeb4f745..addb2fd7da82c94a363e78c2105011fb6749cc82 100644 (file)
@@ -51,7 +51,13 @@ SWITCH_STANDARD_API(expr_function)
        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);