]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add new func to the core
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 30 Jul 2008 15:04:56 +0000 (15:04 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 30 Jul 2008 15:04:56 +0000 (15:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9208 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_core.h
src/switch_core_session.c

index ca6416ae5bad3cab8bb08231448a2d5ebca52078..f474395da558b41a7d1643fb0214d94e352f743d 100644 (file)
@@ -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);
index 3b8ecfd16339894b547a3e5ee5b1c49401406433..a014b11bff9c715b28af848f50be44cbffceacb4 100644 (file)
@@ -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;