Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
7e762497
提交
7e762497
authored
4月 16, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
...
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@4948
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
b3cc03d6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
9 行增加
和
45 行删除
+9
-45
mod_wanpipe.c
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
+9
-45
没有找到文件。
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
浏览文件 @
7e762497
...
...
@@ -134,7 +134,6 @@ struct wanpipe_pri_span {
struct
wpsock
{
sng_fd_t
fd
;
char
*
name
;
struct
private_object
*
tech_pvt
;
};
typedef
struct
wpsock
wpsock_t
;
...
...
@@ -307,20 +306,6 @@ static void *SWITCH_THREAD_FUNC fxs_thread_run(switch_thread_t *thread, void *ob
}
static
int
wp_close
(
private_object_t
*
tech_pvt
)
{
int
ret
=
0
;
switch_mutex_lock
(
globals
.
hash_mutex
);
if
(
tech_pvt
->
wpsock
&&
tech_pvt
->
wpsock
->
tech_pvt
==
tech_pvt
)
{
tech_pvt
->
wpsock
->
tech_pvt
=
NULL
;
ret
=
1
;
}
switch_mutex_unlock
(
globals
.
hash_mutex
);
return
ret
;
}
static
wpsock_t
*
wp_open
(
private_object_t
*
tech_pvt
,
int
span
,
int
chan
)
{
sng_fd_t
fd
;
...
...
@@ -343,17 +328,6 @@ static wpsock_t *wp_open(private_object_t *tech_pvt, int span, int chan)
}
}
if
(
sock
&&
tech_pvt
)
{
if
(
sock
->
tech_pvt
)
{
if
(
tech_pvt
->
session
)
{
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
tech_pvt
->
session
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
}
}
sock
->
tech_pvt
=
tech_pvt
;
tech_pvt
->
wpsock
=
sock
;
}
switch_mutex_unlock
(
globals
.
hash_mutex
);
return
sock
;
...
...
@@ -640,10 +614,6 @@ static switch_status_t wanpipe_on_hangup(switch_core_session_t *session)
tech_pvt
=
switch_core_session_get_private
(
session
);
assert
(
tech_pvt
!=
NULL
);
wp_close
(
tech_pvt
);
switch_core_codec_destroy
(
&
tech_pvt
->
read_codec
);
switch_core_codec_destroy
(
&
tech_pvt
->
write_codec
);
...
...
@@ -962,8 +932,6 @@ static switch_status_t wanpipe_kill_channel(switch_core_session_t *session, int
default:
break
;
}
//sangoma_socket_close(&tech_pvt->wpsock->fd);
//wp_close(tech_pvt);
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -1366,21 +1334,17 @@ static int on_hangup(struct sangoma_pri *spri, sangoma_pri_event_t event_type, p
channel
=
switch_core_session_get_channel
(
session
);
assert
(
channel
!=
NULL
);
tech_pvt
=
switch_core_session_get_private
(
session
);
assert
(
tech_pvt
!=
NULL
);
if
(
!
tech_pvt
->
call
)
{
tech_pvt
->
call
=
pevent
->
hangup
.
call
;
}
if
(
switch_channel_get_state
(
channel
)
<
CS_HANGUP
)
{
tech_pvt
=
switch_core_session_get_private
(
session
);
assert
(
tech_pvt
!=
NULL
);
tech_pvt
->
cause
=
pevent
->
hangup
.
cause
;
switch_set_flag_locked
(
tech_pvt
,
TFLAG_BYE
);
switch_channel_hangup
(
channel
,
tech_pvt
->
cause
);
switch_mutex_lock
(
globals
.
channel_mutex
);
*
chanmap
->
map
[
pevent
->
hangup
.
channel
]
=
'\0'
;
switch_mutex_unlock
(
globals
.
channel_mutex
);
if
(
!
tech_pvt
->
call
)
{
tech_pvt
->
call
=
pevent
->
hangup
.
call
;
}
tech_pvt
->
cause
=
pevent
->
hangup
.
cause
;
switch_channel_hangup
(
channel
,
tech_pvt
->
cause
);
}
switch_core_session_rwunlock
(
session
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论