]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_alsa: fix segfault
authorTravis Cross <tc@traviscross.com>
Sun, 8 Apr 2012 13:08:37 +0000 (13:08 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 8 Apr 2012 13:08:37 +0000 (13:08 +0000)
src/mod/endpoints/mod_alsa/mod_alsa.c

index 40c1362f3d9781ace14dc4deee748afe87609ccc..494a5bed31d30f2ca6146644d53aabaab41c833f 100644 (file)
@@ -748,14 +748,6 @@ static switch_io_routines_t channel_io_routines = {
        /*.receive_message */ channel_receive_message
 };
 
-static switch_endpoint_interface_t channel_endpoint_interface = {
-       /*.interface_name */ "alsa",
-       /*.io_routines */ &channel_io_routines,
-       /*.event_handlers */ &channel_event_handlers,
-       /*.private */ NULL,
-       /*.next */ NULL
-};
-
 
 /* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
    that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
@@ -766,7 +758,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                                                                                                        switch_call_cause_t *cancel_cause)
 {
 
-       if ((*new_session = switch_core_session_request(&channel_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool)) != 0) {
+       if ((*new_session = switch_core_session_request(alsa_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool)) != 0) {
                private_t *tech_pvt;
                switch_channel_t *channel;
                switch_caller_profile_t *caller_profile;
@@ -1437,7 +1429,7 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
        }
        dest = argv[0];
 
-       if ((session = switch_core_session_request(&channel_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL)) != 0) {
+       if ((session = switch_core_session_request(alsa_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL)) != 0) {
                private_t *tech_pvt;
                switch_channel_t *channel;
                char *dialplan = globals.dialplan;