From 300737a18a5341194428420e56e48e6e5c274200 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 29 Aug 2006 23:06:12 +0000 Subject: [PATCH] bigger socket bufer git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2437 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../event_handlers/mod_event_socket/mod_event_socket.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index cd9a97539d..0d5c895f0d 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -57,6 +57,7 @@ struct listener { 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 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event, 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";