]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Please besure to do "make sure" this should fix the assert people were getting on...
authorBrian West <brian@freeswitch.org>
Sat, 3 Mar 2007 21:02:02 +0000 (21:02 +0000)
committerBrian West <brian@freeswitch.org>
Sat, 3 Mar 2007 21:02:02 +0000 (21:02 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4438 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/switch_core.c

index 867eb6a25e4788fe4212203b4bc517f0e4fbe3fa..904ad07d65f8c48a5ab2be72e01b3c895e96ee4b 100644 (file)
@@ -181,7 +181,7 @@ static switch_status_t channel_on_ring(switch_core_session_t *session);
 static switch_status_t channel_on_loopback(switch_core_session_t *session);
 static switch_status_t channel_on_transmit(switch_core_session_t *session);
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t *pool);
+                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool);
 static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
                                                                                  switch_io_flag_t flags, int stream_id);
 static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -1515,7 +1515,7 @@ static const switch_loadable_module_interface_t channel_module_interface = {
    that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
 */
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t *pool)
+                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool)
 {
        if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
                struct private_object *tech_pvt;
index 6870ff2d9601253d251ecc794c8608a6ca683a53..299db5c3efcc0858d0467e9e755c62894f2a107e 100644 (file)
@@ -427,7 +427,7 @@ static switch_status_t channel_on_ring(switch_core_session_t *session);
 static switch_status_t channel_on_loopback(switch_core_session_t *session);
 static switch_status_t channel_on_transmit(switch_core_session_t *session);
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t *pool);
+                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool);
 static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
                                                                                switch_io_flag_t flags, int stream_id);
 static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -803,7 +803,7 @@ static const switch_loadable_module_interface_t channel_module_interface = {
 that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
 */
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t *pool)
+                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool)
 {
        if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
                private_t *tech_pvt;
index d006ac5cbf5449c47874912d41d6c7ec73454fbf..d44dfda0a59ba758ee90120a2a7a8409b9cb4b57 100644 (file)
@@ -144,7 +144,7 @@ static switch_status_t channel_on_loopback(switch_core_session_t *session);
 static switch_status_t channel_on_transmit(switch_core_session_t *session);
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
                                                                                                        switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t *pool);
+                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool);
 static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
                                           switch_io_flag_t flags, int stream_id);
 static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -828,7 +828,7 @@ static const switch_loadable_module_interface_t channel_module_interface = {
    that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
 */
 static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t *pool)
+                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool)
 {
 
        if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
index a866450a87e1b8cad9cd15a84f556bdab306547d..d9bff07c2b9cb15a1beaace0ecfd423f0e43a762 100644 (file)
@@ -336,7 +336,7 @@ static switch_status_t sofia_on_loopback(switch_core_session_t *session);
 static switch_status_t sofia_on_transmit(switch_core_session_t *session);
 
 static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                 switch_core_session_t **new_session, switch_memory_pool_t *pool);
+                                                                                                 switch_core_session_t **new_session, switch_memory_pool_t **pool);
 
 static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
                                                                                switch_io_flag_t flags, int stream_id);
@@ -2237,7 +2237,7 @@ static void logger(void *logarg, char const *fmt, va_list ap)
 
 
 static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
-                                                                                                 switch_core_session_t **new_session, switch_memory_pool_t *pool)
+                                                                                                 switch_core_session_t **new_session, switch_memory_pool_t **pool)
 {
        switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
        switch_core_session_t *nsession;
index 3cb66217cf7415428df553002a942b1e49d978a9..f940762eb0916b9f44dc9dce496d8ed68e042761 100644 (file)
@@ -3717,7 +3717,7 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch
                return NULL;
        }
 
-       if (pool) {
+       if (pool && *pool) {
                usepool = *pool;
                *pool = NULL;
        } else if (switch_core_new_memory_pool(&usepool) != SWITCH_STATUS_SUCCESS) {