From af681d8807b83f0376523db00d1580a1c6da6128 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 2 Apr 2009 18:16:59 +0000 Subject: [PATCH] add event name when sending git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12889 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/esl/src/esl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/esl/src/esl.c b/libs/esl/src/esl.c index 7f41de617a..fd279200b6 100644 --- a/libs/esl/src/esl.c +++ b/libs/esl/src/esl.c @@ -427,6 +427,7 @@ ESL_DECLARE(esl_status_t) esl_attach_handle(esl_handle_t *handle, esl_socket_t s ESL_DECLARE(esl_status_t) esl_sendevent(esl_handle_t *handle, esl_event_t *event) { char *txt; + char event_buf[256] = ""; if (!handle->connected || !event) { return ESL_FAIL; @@ -436,7 +437,9 @@ ESL_DECLARE(esl_status_t) esl_sendevent(esl_handle_t *handle, esl_event_t *event esl_log(ESL_LOG_DEBUG, "SEND EVENT\n%s\n", txt); - send(handle->sock, "sendevent\n", 10, 0); + snprintf(event_buf, sizeof(event_buf), "sendevent %s\n", esl_event_name(event->event_id)); + + send(handle->sock, event_buf, strlen(event_buf), 0); send(handle->sock, txt, strlen(txt), 0); send(handle->sock, "\n\n", 2, 0);