[Freeswitch-svn] [commit] r2437 - freeswitch/trunk/src/mod/event_handlers/mod_event_socket
Freeswitch SVN
anthm at freeswitch.org
Tue Aug 29 19:06:12 EDT 2006
Author: anthm
Date: Tue Aug 29 19:06:12 2006
New Revision: 2437
Modified:
freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
Log:
bigger socket bufer
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Tue Aug 29 19:06:12 2006
@@ -57,6 +57,7 @@
uint32_t flags;
switch_log_level_t level;
char *retbuf;
+ char *ebuf;
uint8_t event_list[SWITCH_EVENT_ALL];
switch_hash_t *event_hash;
struct listener *next;
@@ -334,11 +335,15 @@
switch_event_t *event = (switch_event_t *) pop;
char *etype, *packet, *xmlstr = NULL;
+ if (!listener->ebuf) {
+ listener->ebuf = switch_core_alloc(listener->pool, CMD_BUFLEN);
+ }
+
do_sleep = 0;
if (listener->format == EVENT_FORMAT_PLAIN) {
etype = "plain";
- switch_event_serialize(event, buf, sizeof(buf), NULL);
- packet = buf;
+ switch_event_serialize(event, listener->ebuf, CMD_BUFLEN, NULL);
+ packet = listener->ebuf;
} else {
switch_xml_t xml;
etype = "xml";
More information about the Freeswitch-svn
mailing list