Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
f147f039
提交
f147f039
authored
12月 13, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweak
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@6747
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
99b12efe
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
21 行删除
+24
-21
mod_dptools.c
src/mod/applications/mod_dptools/mod_dptools.c
+1
-1
mod_cdr_csv.c
src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
+1
-1
switch_rtp.c
src/switch_rtp.c
+22
-19
没有找到文件。
src/mod/applications/mod_dptools/mod_dptools.c
浏览文件 @
f147f039
...
@@ -658,7 +658,7 @@ SWITCH_STANDARD_APP(info_function)
...
@@ -658,7 +658,7 @@ SWITCH_STANDARD_APP(info_function)
switch_channel_event_set_data
(
channel
,
event
);
switch_channel_event_set_data
(
channel
,
event
);
switch_event_serialize
(
event
,
&
buf
,
SWITCH_FALSE
);
switch_event_serialize
(
event
,
&
buf
,
SWITCH_FALSE
);
switch_assert
(
buf
);
switch_assert
(
buf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
CRIT
,
"CHANNEL_DATA:
\n
%s
\n
"
,
buf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
INFO
,
"CHANNEL_DATA:
\n
%s
\n
"
,
buf
);
switch_event_destroy
(
&
event
);
switch_event_destroy
(
&
event
);
free
(
buf
);
free
(
buf
);
}
}
...
...
src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
浏览文件 @
f147f039
...
@@ -278,7 +278,7 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
...
@@ -278,7 +278,7 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
switch_channel_event_set_data
(
channel
,
event
);
switch_channel_event_set_data
(
channel
,
event
);
switch_event_serialize
(
event
,
&
buf
,
SWITCH_FALSE
);
switch_event_serialize
(
event
,
&
buf
,
SWITCH_FALSE
);
switch_assert
(
buf
);
switch_assert
(
buf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
CRIT
,
"CHANNEL_DATA:
\n
%s
\n
"
,
buf
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
INFO
,
"CHANNEL_DATA:
\n
%s
\n
"
,
buf
);
switch_event_destroy
(
&
event
);
switch_event_destroy
(
&
event
);
free
(
buf
);
free
(
buf
);
}
}
...
...
src/switch_rtp.c
浏览文件 @
f147f039
...
@@ -310,17 +310,17 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_set_end_port(switch_port_t port)
...
@@ -310,17 +310,17 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_set_end_port(switch_port_t port)
return
END_PORT
;
return
END_PORT
;
}
}
static
void
release_port
(
switch_rtp_t
*
rtp_session
)
static
void
release_port
(
const
char
*
host
,
int
port
)
{
{
switch_core_port_allocator_t
*
alloc
=
NULL
;
switch_core_port_allocator_t
*
alloc
=
NULL
;
if
(
!
rtp_session
->
rx_
host
)
{
if
(
!
host
)
{
return
;
return
;
}
}
switch_mutex_lock
(
port_lock
);
switch_mutex_lock
(
port_lock
);
if
((
alloc
=
switch_core_hash_find
(
alloc_hash
,
rtp_session
->
rx_
host
)))
{
if
((
alloc
=
switch_core_hash_find
(
alloc_hash
,
host
)))
{
switch_core_port_allocator_free_port
(
alloc
,
rtp_session
->
rx_
port
);
switch_core_port_allocator_free_port
(
alloc
,
port
);
}
}
switch_mutex_unlock
(
port_lock
);
switch_mutex_unlock
(
port_lock
);
...
@@ -412,7 +412,6 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
...
@@ -412,7 +412,6 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
*
err
=
"Send myself a packet failed!"
;
*
err
=
"Send myself a packet failed!"
;
goto
done
;
goto
done
;
}
}
release_port
(
rtp_session
);
old_sock
=
rtp_session
->
sock
;
old_sock
=
rtp_session
->
sock
;
rtp_session
->
sock
=
new_sock
;
rtp_session
->
sock
=
new_sock
;
...
@@ -429,12 +428,6 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
...
@@ -429,12 +428,6 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
done
:
done
:
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
rtp_session
->
rx_host
=
switch_core_strdup
(
rtp_session
->
pool
,
host
);
rtp_session
->
rx_port
=
port
;
rtp_session
->
ready
=
1
;
}
if
(
new_sock
)
{
if
(
new_sock
)
{
switch_socket_close
(
new_sock
);
switch_socket_close
(
new_sock
);
}
}
...
@@ -611,21 +604,31 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
...
@@ -611,21 +604,31 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
uint32_t
ms_per_packet
,
uint32_t
ms_per_packet
,
switch_rtp_flag_t
flags
,
char
*
crypto_key
,
char
*
timer_name
,
const
char
**
err
,
switch_memory_pool_t
*
pool
)
switch_rtp_flag_t
flags
,
char
*
crypto_key
,
char
*
timer_name
,
const
char
**
err
,
switch_memory_pool_t
*
pool
)
{
{
switch_rtp_t
*
rtp_session
;
switch_rtp_t
*
rtp_session
=
NULL
;
if
(
switch_rtp_create
(
&
rtp_session
,
payload
,
samples_per_interval
,
ms_per_packet
,
flags
,
crypto_key
,
timer_name
,
err
,
pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_rtp_create
(
&
rtp_session
,
payload
,
samples_per_interval
,
ms_per_packet
,
flags
,
crypto_key
,
timer_name
,
err
,
pool
)
!=
SWITCH_STATUS_SUCCESS
)
{
return
NULL
;
goto
end
;
}
}
if
(
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
tx_port
,
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_rtp_set_remote_address
(
rtp_session
,
tx_host
,
tx_port
,
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
return
NULL
;
rtp_session
=
NULL
;
goto
end
;
}
}
if
(
switch_rtp_set_local_address
(
rtp_session
,
rx_host
,
rx_port
,
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_rtp_set_local_address
(
rtp_session
,
rx_host
,
rx_port
,
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
r
eturn
NULL
;
r
tp_session
=
NULL
;
}
}
end
:
if
(
rtp_session
)
{
rtp_session
->
ready
=
1
;
rtp_session
->
ready
=
1
;
rtp_session
->
rx_host
=
switch_core_strdup
(
rtp_session
->
pool
,
rx_host
);
rtp_session
->
rx_port
=
rx_port
;
}
else
{
release_port
(
rx_host
,
rx_port
);
}
return
rtp_session
;
return
rtp_session
;
}
}
...
@@ -720,7 +723,7 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
...
@@ -720,7 +723,7 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
switch_core_timer_destroy
(
&
(
*
rtp_session
)
->
timer
);
switch_core_timer_destroy
(
&
(
*
rtp_session
)
->
timer
);
}
}
release_port
(
*
rtp_session
);
release_port
(
(
*
rtp_session
)
->
rx_host
,
(
*
rtp_session
)
->
rx_port
);
switch_mutex_unlock
((
*
rtp_session
)
->
flag_mutex
);
switch_mutex_unlock
((
*
rtp_session
)
->
flag_mutex
);
return
;
return
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论