Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ed76b252
提交
ed76b252
authored
3月 01, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@4419
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
c612d422
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
17 行增加
和
25 行删除
+17
-25
switch_core.h
src/include/switch_core.h
+1
-2
mod_portaudio.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
+8
-3
switch.c
src/switch.c
+1
-8
switch_core.c
src/switch_core.c
+6
-11
switch_loadable_module.c
src/switch_loadable_module.c
+1
-1
没有找到文件。
src/include/switch_core.h
浏览文件 @
ed76b252
...
...
@@ -233,10 +233,9 @@ SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new_limit);
/*!
\brief Destroy the core
\param vg nonzero to skip core uninitilize for memory debugging
\note to be called at application shutdown
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_core_destroy
(
int
vg
);
SWITCH_DECLARE
(
switch_status_t
)
switch_core_destroy
(
void
);
///\}
...
...
src/mod/endpoints/mod_portaudio/mod_portaudio.c
浏览文件 @
ed76b252
...
...
@@ -1045,9 +1045,14 @@ static switch_status_t load_config(void)
SWITCH_MOD_DECLARE
(
switch_status_t
)
switch_module_shutdown
(
void
)
{
switch_core_codec_destroy
(
&
globals
.
read_codec
);
switch_core_codec_destroy
(
&
globals
.
write_codec
);
if
(
globals
.
read_codec
.
implementation
)
{
switch_core_codec_destroy
(
&
globals
.
read_codec
);
}
if
(
globals
.
write_codec
.
implementation
)
{
switch_core_codec_destroy
(
&
globals
.
write_codec
);
}
Pa_Terminate
();
return
SWITCH_STATUS_SUCCESS
;
...
...
src/switch.c
浏览文件 @
ed76b252
...
...
@@ -198,9 +198,6 @@ int main(int argc, char *argv[])
const
char
*
err
=
NULL
;
// error value for return from freeswitch initialization
#ifndef WIN32
int
nf
=
0
;
// TRUE if we are running in nofork mode
int
vg
=
0
;
// Allways TRUE on windows to not do apr_terminate
#else
int
vg
=
1
;
// TRUE if we are running in vg mode
#endif
int
nc
=
0
;
// TRUE if we are running in noconsole mode
FILE
*
f
;
// file handle to the pid file
...
...
@@ -233,7 +230,6 @@ int main(int argc, char *argv[])
"
\t
-hp -- enable high priority settings
\n
"
"
\t
-stop -- stop freeswitch
\n
"
"
\t
-nc -- do not output to a console and background
\n
"
"
\t
-vg -- enable valgrind mode
\n
"
"
\t
-conf [confdir] -- specify an alternate config dir
\n
"
"
\t
-log [logdir] -- specify an alternate log dir
\n
"
"
\t
-db [dbdir] -- specify an alternate db dir
\n
"
;
...
...
@@ -307,9 +303,6 @@ int main(int argc, char *argv[])
nc
++
;
}
if
(
argv
[
x
]
&&
!
strcmp
(
argv
[
x
],
"-vg"
))
{
vg
++
;
}
if
(
argv
[
x
]
&&
!
strcmp
(
argv
[
x
],
"-conf"
))
{
x
++
;
...
...
@@ -389,7 +382,7 @@ int main(int argc, char *argv[])
switch_core_runtime_loop
(
nc
);
return
switch_core_destroy
(
vg
);
return
switch_core_destroy
();
}
/* For Emacs:
...
...
src/switch_core.c
浏览文件 @
ed76b252
...
...
@@ -590,13 +590,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_sessio
if
(
switch_test_flag
(
session
,
SSF_DESTROYED
))
{
status
=
SWITCH_STATUS_FALSE
;
#ifdef SWITCH_DEBUG_RWLOCKS
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
DEBUG
,
"%s Read lock FAIL
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
ERROR
,
"%s Read lock FAIL
\n
"
,
switch_channel_get_name
(
session
->
channel
));
#endif
}
else
{
status
=
(
switch_status_t
)
switch_thread_rwlock_tryrdlock
(
session
->
rwlock
);
#ifdef SWITCH_DEBUG_RWLOCKS
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
DEBUG
,
"%s Read lock AQUIRED
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
ERROR
,
"%s Read lock AQUIRED
\n
"
,
switch_channel_get_name
(
session
->
channel
));
#endif
}
...
...
@@ -612,7 +612,7 @@ SWITCH_DECLARE(void) switch_core_session_perform_write_lock(switch_core_session_
int
line
)
{
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
DEBUG
,
"%s Write lock AQUIRED
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
ERROR
,
"%s Write lock AQUIRED
\n
"
,
switch_channel_get_name
(
session
->
channel
));
#else
SWITCH_DECLARE
(
void
)
switch_core_session_write_lock
(
switch_core_session_t
*
session
)
...
...
@@ -627,7 +627,7 @@ SWITCH_DECLARE(void) switch_core_session_perform_rwunlock(switch_core_session_t
const
char
*
func
,
int
line
)
{
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
DEBUG
,
"%s Read/Write lock CLEARED
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_ID_LOG
,
file
,
func
,
line
,
SWITCH_LOG_
ERROR
,
"%s Read/Write lock CLEARED
\n
"
,
switch_channel_get_name
(
session
->
channel
));
#else
SWITCH_DECLARE
(
void
)
switch_core_session_rwunlock
(
switch_core_session_t
*
session
)
...
...
@@ -4563,7 +4563,7 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, uint32
return
0
;
}
SWITCH_DECLARE
(
switch_status_t
)
switch_core_destroy
(
int
vg
)
SWITCH_DECLARE
(
switch_status_t
)
switch_core_destroy
(
void
)
{
switch_event_t
*
event
;
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_SHUTDOWN
)
==
SWITCH_STATUS_SUCCESS
)
{
...
...
@@ -4590,9 +4590,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
switch_core_db_close
(
runtime
.
db
);
switch_core_db_close
(
runtime
.
event_db
);
switch_xml_destroy
();
if
(
vg
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"Full destruction of the core disabled for memory debugging purposes.
\n
"
);
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CONSOLE
,
"Finalizing Shutdown.
\n
"
);
switch_log_shutdown
();
...
...
@@ -4617,9 +4614,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(int vg)
if
(
runtime
.
memory_pool
)
{
apr_pool_destroy
(
runtime
.
memory_pool
);
if
(
!
vg
)
{
apr_terminate
();
}
//apr_terminate();
}
return
SWITCH_STATUS_SUCCESS
;
...
...
src/switch_loadable_module.c
浏览文件 @
ed76b252
...
...
@@ -75,7 +75,7 @@ static void *switch_loadable_module_exec(switch_thread_t *thread, void *obj)
for
(
restarts
=
0
;
status
!=
SWITCH_STATUS_TERM
;
restarts
++
)
{
status
=
module
->
switch_module_runtime
();
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
DEBUG
,
"Thread ended for %s
\n
"
,
module
->
module_interface
->
module_name
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_
NOTICE
,
"Thread ended for %s
\n
"
,
module
->
module_interface
->
module_name
);
if
(
ts
->
pool
)
{
switch_memory_pool_t
*
pool
=
ts
->
pool
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论