From 9cc550ee18ae7fa6a7c28dfbc2c3020d0b423017 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 26 Jan 2013 12:52:36 -0600 Subject: [PATCH] build sdp lib inline w/ core --- Makefile.am | 3 ++- src/switch_core_media.c | 2 +- src/switch_sdp.c | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/switch_sdp.c diff --git a/Makefile.am b/Makefile.am index be48c440f1..88ff956472 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = foreign NAME = freeswitch AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS) -AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -Ilibs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip -Ilibs/sofia-sip/libsofia-sip-ua/su +AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -Ilibs/sofia-sip/libsofia-sip-ua/sdp -Ilibs/sofia-sip/libsofia-sip-ua/su AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) DEFAULT_SOUNDS=en-us-callie-8000 @@ -242,6 +242,7 @@ libfreeswitch_la_SOURCES = \ src/switch_core_port_allocator.c \ src/switch_core.c \ src/switch_core_media.c \ + src/switch_sdp.c \ src/switch_scheduler.c \ src/switch_core_db.c \ src/switch_dso.c \ diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 5f73cb4958..50a5c2f7ad 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -39,7 +39,7 @@ #include "private/switch_core_pvt.h" #include #include -#include +#include #include SWITCH_DECLARE(switch_t38_options_t *) switch_core_media_process_udptl(switch_core_session_t *session, sdp_session_t *sdp, sdp_media_t *m); diff --git a/src/switch_sdp.c b/src/switch_sdp.c new file mode 100644 index 0000000000..be8b24e63f --- /dev/null +++ b/src/switch_sdp.c @@ -0,0 +1,18 @@ + +#include + +sdp_connection_t *sdp_media_connections(sdp_media_t const *m) +{ + if (m) { + if (m->m_connections) + return m->m_connections; + if (m->m_session) + return m->m_session->sdp_connection; + } + return NULL; +} + +#include +#include +#include +#include