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

src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c

index 824511c6beda238de68830f9338415caddc234d8..1eefd74dc8c19c56bf3b7032ad7f1a42dea6508e 100644 (file)
@@ -800,7 +800,7 @@ static switch_status_t place_call(char *dest, switch_stream_handle_t *stream)
        switch_status_t status = SWITCH_STATUS_FALSE;
 
        if (!dest) {
-               strncpy(out, "Usage: pacall <exten>", outlen - 1);
+               stream->write_function(stream, "Usage: pacall <exten>");
                return SWITCH_STATUS_FALSE;
        }
 
@@ -957,7 +957,7 @@ static switch_status_t call_info(char *callid, switch_stream_handle_t *stream)
                        print_info(tech_pvt, stream);
                }
        } else if (callid && (tech_pvt = switch_core_hash_find(globals.call_hash, callid)) != 0) {
-               print_info(tech_pvt, out, outlen);
+               print_info(tech_pvt, stream);
        } else {
                stream->write_function(stream, "NO SUCH CALL");
        }
index c4d6cea030a547af4e59201eb7eb7021b2ef1b0a..c0d2a63d5b36e0570ff78bb6bf89093d102d65db 100644 (file)
@@ -222,7 +222,8 @@ static int on_msg(void *user_data, ikspak * pak)
 {
        char *cmd = iks_find_cdata(pak->x, "body");
        char *arg = NULL;
-       char retbuf[1024] = "";
+       switch_stream_handle_t stream = {0};
+       char retbuf[2048] = "";
        char *p;
 
        if ((p = strchr(cmd, '\r')) != 0) {
@@ -235,7 +236,10 @@ static int on_msg(void *user_data, ikspak * pak)
                *arg++ = '\0';
        }
 
-       switch_api_execute(cmd, arg, retbuf, sizeof(retbuf));
+       stream.data = retbuf;
+       stream.end = stream.data;
+       stream.data_size = sizeof(retbuf);
+       switch_api_execute(cmd, arg, &stream);
 
        return 0;
 }