]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 10 May 2006 16:10:18 +0000 (16:10 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 10 May 2006 16:10:18 +0000 (16:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1414 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c

index c83c511e256a0b4dfd2ca077c426b45b2c64036e..80c267f36e9b99eb27e042abf3ea6b7b7f88f265 100644 (file)
@@ -203,28 +203,22 @@ static switch_status_t http_stream_write(switch_stream_handle_t *handle, char *f
 abyss_bool HandleHook(TSession *r)
 {
     char *m = "text/html";
-       char *command, *arg;
        switch_stream_handle_t stream = {0};
-
+       char *command;
        if(strncmp(r->uri, "/api/", 5)) {
                return FALSE;
        }
 
-       command = strdup(r->uri + 5);
-       if((arg = strchr(command, '/'))) {
-               *arg++ = '\0';
-       } else if((arg = strchr(command, '?'))) {
-               *arg++ = '\0';
-       }
+       command = r->uri + 5;
+       
        ResponseChunked(r);
        ResponseStatus(r,200);
        ResponseContentType(r, m);
     ResponseWrite(r);
        stream.data = r;
        stream.write_function = http_stream_write;
-       switch_api_execute(command, arg, &stream);
+       switch_api_execute(command, r->query, &stream);
        HTTPWriteEnd(r);
-       free(command);
     return TRUE;
 }