Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9fa6fb5e
提交
9fa6fb5e
authored
11月 15, 2010
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: remove unused patches directory
上级
6cfce6f4
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
0 行增加
和
134 行删除
+0
-134
oz.diff
libs/freetdm/patches/oz.diff
+0
-134
没有找到文件。
libs/freetdm/patches/oz.diff
deleted
100644 → 0
浏览文件 @
6cfce6f4
Index: src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c
===================================================================
--- src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c (revision 745)
+++ src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c (working copy)
@@ -98,19 +98,21 @@
* so we can have one analong handler thread that will deal with all the idle analog channels for events
* the alternative would be for the driver to provide one socket for all of the oob events for all analog channels
*/
-static __inline__ int tdmv_api_wait_socket(sng_fd_t fd, int timeout, int *flags)
+static __inline__ int tdmv_api_wait_socket(zap_channel_t *zchan, int timeout, int *flags)
{
#ifdef LIBSANGOMA_VERSION
int err;
- sangoma_wait_obj_t sangoma_wait_obj;
+ sangoma_wait_obj_t *sangoma_wait_obj = zchan->mod_data;
- sangoma_init_wait_obj(&sangoma_wait_obj, fd, 1, 1, *flags, SANGOMA_WAIT_OBJ);
+ sangoma_init_wait_obj(sangoma_wait_obj, zchan->sockfd, 1, 1, 0, SANGOMA_WAIT_OBJ);
- err=sangoma_socket_waitfor_many(&sangoma_wait_obj,1 , timeout);
+ err = sangoma_socket_waitfor_many(&sangoma_wait_obj, 1, timeout);
+
if (err > 0) {
- *flags=sangoma_wait_obj.flags_out;
+ *flags = sangoma_wait_obj.flags_out;
}
+
return err;
#else
@@ -118,7 +120,7 @@
int res;
memset(&pfds[0], 0, sizeof(pfds[0]));
- pfds[0].fd = fd;
+ pfds[0].fd = zchan->sockfd;
pfds[0].events = *flags;
res = poll(pfds, 1, timeout);
*flags = 0;
@@ -200,6 +202,15 @@
if (sockfd != WP_INVALID_SOCKET && zap_span_add_channel(span, sockfd, type, &chan) == ZAP_SUCCESS) {
wanpipe_tdm_api_t tdm_api;
+#ifdef LIBSANGOMA_VERSION
+ sangoma_wait_obj_t *sangoma_wait_obj;
+
+ sangoma_wait_obj = malloc(sizeof(*sangoma_wait_obj));
+ memset(sangoma_wait_obj, 0, sizeof(*sangoma_wait_obj));
+ sangoma_init_wait_obj(sangoma_wait_obj, sockfd, 1, 1, 0, SANGOMA_WAIT_OBJ);
+ chan->mod_data = sangoma_wait_obj;
+#endif
+
memset(&tdm_api,0,sizeof(tdm_api));
chan->physical_span_id = spanno;
@@ -211,7 +222,7 @@
dtmf = "software";
- /* FIXME: Handle Error Conditino Check for return code */
+ /* FIXME: Handle Error Condition Check for return code */
err= sangoma_tdm_get_hw_coding(chan->sockfd, &tdm_api);
if (tdm_api.wp_tdm_cmd.hw_tdm_coding) {
@@ -606,7 +617,7 @@
inflags |= POLLPRI;
}
- result = tdmv_api_wait_socket(zchan->sockfd, to, &inflags);
+ result = tdmv_api_wait_socket(zchan, to, &inflags);
*flags = ZAP_NO_FLAGS;
@@ -643,26 +654,30 @@
ZIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
{
#ifdef LIBSANGOMA_VERSION
- sangoma_wait_obj_t pfds[ZAP_MAX_CHANNELS_SPAN];
+ sangoma_wait_obj_t *pfds[ZAP_MAX_CHANNELS_SPAN] = { 0 };
#else
struct pollfd pfds[ZAP_MAX_CHANNELS_SPAN];
#endif
uint32_t i, j = 0, k = 0, l = 0;
- int objects=0;
int r;
for(i = 1; i <= span->chan_count; i++) {
zap_channel_t *zchan = span->channels[i];
+
#ifdef LIBSANGOMA_VERSION
- sangoma_init_wait_obj(&pfds[j], zchan->sockfd , 1, 1, POLLPRI, SANGOMA_WAIT_OBJ);
+ if (!zchan->mod_data) {
+ continue;
+ }
+ pfds[j] = zchan->mod_data;
+
#else
memset(&pfds[j], 0, sizeof(pfds[j]));
pfds[j].fd = span->channels[i]->sockfd;
pfds[j].events = POLLPRI;
#endif
- objects++;
+
/* The driver probably should be able to do this wink/flash/ringing by itself this is sort of a hack to make it work! */
if (zap_test_flag(zchan, ZAP_CHANNEL_WINK) || zap_test_flag(zchan, ZAP_CHANNEL_FLASH)) {
@@ -703,7 +718,7 @@
ms = l;
}
#ifdef LIBSANGOMA_VERSION
- r = sangoma_socket_waitfor_many(pfds,objects,ms);
+ r = sangoma_socket_waitfor_many(pfds, j, ms);
#else
r = poll(pfds, j, ms);
#endif
@@ -935,6 +950,15 @@
*/
static ZIO_CHANNEL_DESTROY_FUNCTION(wanpipe_channel_destroy)
{
+ sangoma_wait_obj_t *sangoma_wait_obj;
+
+ if (zchan->mod_data) {
+ sangoma_wait_obj = zchan->mod_data;
+ zchan->mod_data = NULL;
+ sangoma_release_wait_obj(sangoma_wait_obj);
+ free(sangoma_wait_obj);
+ }
+
if (zchan->sockfd > -1) {
close(zchan->sockfd);
zchan->sockfd = WP_INVALID_SOCKET;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论