From b734a677d4ff9a9bc77050b637fa24d31a051756 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 30 Jul 2008 15:04:56 +0000 Subject: [PATCH] add new func to the core git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9208 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_core.h | 2 +- src/switch_core_session.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/switch_core.h b/src/include/switch_core.h index ca6416ae5b..f474395da5 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -1628,7 +1628,7 @@ SWITCH_DECLARE(void) switch_core_set_globals(void); \return TRUE or FALSE */ SWITCH_DECLARE(uint8_t) switch_core_session_compare(switch_core_session_t *a, switch_core_session_t *b); - +SWITCH_DECLARE(uint8_t) switch_core_session_check_interface(switch_core_session_t *session, const switch_endpoint_interface_t *endpoint_interface); SWITCH_DECLARE(switch_hash_index_t *) switch_core_mime_index(void); SWITCH_DECLARE(const char *) switch_core_mime_ext2type(const char *ext); SWITCH_DECLARE(switch_status_t) switch_core_mime_add_type(const char *type, const char *ext); diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 3b8ecfd163..a014b11bff 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -968,6 +968,14 @@ SWITCH_DECLARE(uint8_t) switch_core_session_compare(switch_core_session_t *a, sw return (uint8_t) (a->endpoint_interface == b->endpoint_interface); } +SWITCH_DECLARE(uint8_t) switch_core_session_check_interface(switch_core_session_t *session, const switch_endpoint_interface_t *endpoint_interface) +{ + switch_assert(session != NULL); + switch_assert(endpoint_interface != NULL); + + return (uint8_t) (session->endpoint_interface == endpoint_interface); +} + SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session_t *session) { return session->uuid_str;