]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add SOCKET_EVENT event
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 Jan 2010 17:46:55 +0000 (17:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 Jan 2010 17:46:55 +0000 (17:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16135 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/src/esl.c
libs/esl/src/esl_event.c
libs/esl/src/include/esl_event.h
src/include/switch_types.h
src/mod/event_handlers/mod_event_socket/mod_event_socket.c
src/switch_event.c

index 03d1e026acab039b5d4d7e8a474561588ff0f807..565cf9d5bef7c04984effa70c7c61272e2facd6c 100644 (file)
@@ -834,6 +834,9 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
                                
                                if (!revent) {
                                        esl_event_create(&revent, ESL_EVENT_CLONE);
+                                       revent->event_id = ESL_EVENT_SOCKET_DATA;
+                                       esl_event_add_header_string(revent, ESL_STACK_BOTTOM, "Event-Name", "SOCKET_DATA");
+
                                }
                                
                                hname = beg;
index 27f680acf97a835bbab5f4f15ae2173c5bfb9b20..1188a01707a43a57bd59cd0a9c766006bc249962 100644 (file)
@@ -130,6 +130,7 @@ static const char *EVENT_NAMES[] = {
        "RECORD_STOP",
        "CALL_UPDATE",
        "FAILURE",
+       "SOCKET_DATA",
        "ALL"
 };
 
index 712c12fa453e422fa60b4b3d770778da93dbf974..790add2d54185c2ed9383ef25a09a62b993d2147 100644 (file)
@@ -118,6 +118,7 @@ typedef enum {
        ESL_EVENT_RECORD_STOP,
        ESL_EVENT_CALL_UPDATE,
        ESL_EVENT_FAILURE,
+       ESL_EVENT_SOCKET_DATA,
        ESL_EVENT_ALL
 } esl_event_types_t;
 
index a3ff346cf0c7911515614c7c8fd864fee796194a..9609a1fa7852be0c3fbfc7eec36665cc907df8eb 100644 (file)
@@ -1338,6 +1338,7 @@ typedef enum {
        SWITCH_EVENT_RECORD_STOP,
        SWITCH_EVENT_CALL_UPDATE,
        SWITCH_EVENT_FAILURE,
+       SWITCH_EVENT_SOCKET_DATA,
        SWITCH_EVENT_ALL
 } switch_event_types_t;
 
index 3ef03f3a9facebbdcd9390005990a6e06af5bd3a..2480c8cc945e520c42b1aa552af170704a7034fd 100644 (file)
@@ -1084,7 +1084,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
                                        }
                                        count++;
                                        if (count == 1) {
-                                               switch_event_create(event, SWITCH_EVENT_COMMAND);
+                                               switch_event_create(event, SWITCH_EVENT_SOCKET_DATA);
                                                switch_event_add_header_string(*event, SWITCH_STACK_BOTTOM, "Command", mbuf);
                                        } else if (cur) {
                                                char *var, *val;
index 8ee097f271786e6637281bbc250aa1dbe01d5fbb..85d6ed061a0f380fae488327e374206013824658 100644 (file)
@@ -186,6 +186,7 @@ static char *EVENT_NAMES[] = {
        "RECORD_STOP",
        "CALL_UPDATE",
        "FAILURE",
+       "SOCKET_DATA",
        "ALL"
 };