From: Anthony Minessale Date: Wed, 10 May 2006 16:10:18 +0000 (+0000) Subject: update X-Git-Tag: v1.0-beta1~2677 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9304f3909b59f7da9b4f31cfd84bf039ed281605;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1414 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c index c83c511e25..80c267f36e 100644 --- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c @@ -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; }