提交 dbc79969 authored 作者: Moises Silva's avatar Moises Silva

fixed small compilation issue when using the libsangoma included in the feature…

fixed small compilation issue when using the libsangoma included in the feature frozen wanpipe driver

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@748 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 3a238fcf
...@@ -62,10 +62,14 @@ ...@@ -62,10 +62,14 @@
#define sangoma_create_socket_intr sangoma_open_api_span_chan #define sangoma_create_socket_intr sangoma_open_api_span_chan
#endif #endif
/*! Starting with lbisangoma 3 we can use it, previous versions dont really work so we default to using the old stuff */ /*! Starting with libsangoma 3 we can use the new libsangoma waitable API, the poor souls of those using a release were LIBSANGOMA version
#if defined(LIBSANGOMA_VERSION) && LIBSANGOMA_VERSION_CODE < LIBSANGOMA_VERSION(3,0,0) * is defined but the version is not higher or equal to 3.0.0 will be forced to upgrade
* */
#ifdef LIBSANGOMA_VERSION
#if LIBSANGOMA_VERSION_CODE < LIBSANGOMA_VERSION(3,0,0)
#undef LIBSANGOMA_VERSION #undef LIBSANGOMA_VERSION
#endif #endif
#endif
/** /**
* \brief Wanpipe flags * \brief Wanpipe flags
...@@ -970,13 +974,14 @@ ZIO_SPAN_NEXT_EVENT_FUNCTION(wanpipe_next_event) ...@@ -970,13 +974,14 @@ ZIO_SPAN_NEXT_EVENT_FUNCTION(wanpipe_next_event)
*/ */
static ZIO_CHANNEL_DESTROY_FUNCTION(wanpipe_channel_destroy) static ZIO_CHANNEL_DESTROY_FUNCTION(wanpipe_channel_destroy)
{ {
sangoma_wait_obj_t *sangoma_wait_obj; #ifdef LIBSANGOMA_VERSION
if (zchan->mod_data) { if (zchan->mod_data) {
sangoma_wait_obj = zchan->mod_data; sangoma_wait_obj = zchan->mod_data;
sangoma_wait_obj_t *sangoma_wait_obj;
zchan->mod_data = NULL; zchan->mod_data = NULL;
sangoma_wait_obj_delete(&sangoma_wait_obj); sangoma_wait_obj_delete(&sangoma_wait_obj);
} }
#endif
if (zchan->sockfd > -1) { if (zchan->sockfd > -1) {
close(zchan->sockfd); close(zchan->sockfd);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论