add optional pool arguement to outgoing channel to allow pre-created pools to be donated to the new session

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@726 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-03-02 14:49:23 +00:00
1 parent aabfeee994
commit e9ba607a6c
10 files changed
+30 -32

No files matched your search

+3 -3
View File
@@ -156,7 +156,7 @@ static switch_status exosip_on_hangup(switch_core_session *session);
static switch_status exosip_on_loopback(switch_core_session *session);
static switch_status exosip_on_transmit(switch_core_session *session);
static switch_status exosip_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session);
switch_core_session **new_session, switch_memory_pool *pool);
static switch_status exosip_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status exosip_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -878,9 +878,9 @@ static const switch_loadable_module_interface exosip_module_interface = {
};
static switch_status exosip_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session)
switch_core_session **new_session, switch_memory_pool *pool)
{
if ((*new_session = switch_core_session_request(&exosip_endpoint_interface, NULL)) != 0) {
if ((*new_session = switch_core_session_request(&exosip_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel *channel;
+3 -3
View File
@@ -393,7 +393,7 @@ static switch_status channel_on_ring(switch_core_session *session);
static switch_status channel_on_loopback(switch_core_session *session);
static switch_status channel_on_transmit(switch_core_session *session);
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session);
switch_core_session **new_session, switch_memory_pool *pool);
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -709,9 +709,9 @@ static const switch_loadable_module_interface channel_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session)
switch_core_session **new_session, switch_memory_pool *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel *channel;
switch_caller_profile *caller_profile;
@@ -105,7 +105,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
static switch_status channel_on_transmit(switch_core_session *session);
static switch_status channel_outgoing_channel(switch_core_session *session,
switch_caller_profile *outbound_profile,
switch_core_session **new_session);
switch_core_session **new_session, switch_memory_pool *pool);
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -476,9 +476,9 @@ static const switch_loadable_module_interface channel_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session)
switch_core_session **new_session, switch_memory_pool *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel *channel;
switch_caller_profile *caller_profile;
+3 -3
View File
@@ -193,7 +193,7 @@ static switch_status wanpipe_on_hangup(switch_core_session *session);
static switch_status wanpipe_on_loopback(switch_core_session *session);
static switch_status wanpipe_on_transmit(switch_core_session *session);
static switch_status wanpipe_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session);
switch_core_session **new_session, switch_memory_pool *pool);
static switch_status wanpipe_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status wanpipe_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -356,7 +356,7 @@ static switch_status wanpipe_on_transmit(switch_core_session *session)
}
static switch_status wanpipe_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session)
switch_core_session **new_session, switch_memory_pool *pool)
{
if (!globals.configured_spans) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Error No Spans Configured.\n");
@@ -364,7 +364,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
}
if ((*new_session = switch_core_session_request(&wanpipe_endpoint_interface, NULL))) {
if ((*new_session = switch_core_session_request(&wanpipe_endpoint_interface, pool))) {
struct private_object *tech_pvt;
switch_channel *channel;
+3 -3
View File
@@ -169,7 +169,7 @@ static switch_status woomerachan_on_ring(switch_core_session *session);
static switch_status woomerachan_on_loopback(switch_core_session *session);
static switch_status woomerachan_on_transmit(switch_core_session *session);
static switch_status woomerachan_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session);
switch_core_session **new_session, switch_memory_pool *pool);
static switch_status woomerachan_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status woomerachan_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -466,9 +466,9 @@ static const switch_loadable_module_interface woomerachan_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status woomerachan_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session)
switch_core_session **new_session, switch_memory_pool *pool)
{
if ((*new_session = switch_core_session_request(&woomerachan_endpoint_interface, NULL)) != 0) {
if ((*new_session = switch_core_session_request(&woomerachan_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel *channel;