[asterisk-commits] qwell: branch qwell/fun_with_transports r384986 - /team/qwell/fun_with_transp...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 8 12:57:03 CDT 2013


Author: qwell
Date: Mon Apr  8 12:56:59 2013
New Revision: 384986

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384986
Log:
Don't bother creating a buffer.  Just use the data directly.

Modified:
    team/qwell/fun_with_transports/res/res_sip_transport_websocket.c

Modified: team/qwell/fun_with_transports/res/res_sip_transport_websocket.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/fun_with_transports/res/res_sip_transport_websocket.c?view=diff&rev=384986&r1=384985&r2=384986
==============================================================================
--- team/qwell/fun_with_transports/res/res_sip_transport_websocket.c (original)
+++ team/qwell/fun_with_transports/res/res_sip_transport_websocket.c Mon Apr  8 12:56:59 2013
@@ -61,10 +61,7 @@
 {
 	struct ws_transport *wstransport = (struct ws_transport *)transport;
 
-	char buf[1024];
-	pj_ssize_t size = pjsip_msg_print(tdata->msg, buf, sizeof(buf));
-
-	ast_websocket_write(wstransport->ws_session, AST_WEBSOCKET_OPCODE_TEXT, buf, size);
+	ast_websocket_write(wstransport->ws_session, AST_WEBSOCKET_OPCODE_TEXT, tdata->buf.start, (int)(tdata->buf.cur - tdata->buf.start));
 
 	return PJ_SUCCESS;
 }




More information about the asterisk-commits mailing list