Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fc997aae
提交
fc997aae
authored
10月 24, 2011
作者:
Nenad Corbic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: logging fixes, ss7 events sanity checks
上级
563460ce
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
29 行增加
和
13 行删除
+29
-13
ftmod_sangoma_ss7_logger.c
...dm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
+1
-1
ftmod_sangoma_ss7_main.c
...etdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
+13
-3
ftmod_sangoma_ss7_main.h
...etdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
+1
-1
ftmod_sangoma_ss7_support.c
...m/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
+12
-6
ftmod_sangoma_ss7_xml.c
...eetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c
+2
-2
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
浏览文件 @
fc997aae
...
@@ -791,7 +791,7 @@ void handle_sng_relay_alarm(Pst *pst, RyMngmt *sta)
...
@@ -791,7 +791,7 @@ void handle_sng_relay_alarm(Pst *pst, RyMngmt *sta)
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
(
LRY_USTA_UP
):
/* channel up */
case
(
LRY_USTA_UP
):
/* channel up */
ftdm_log
(
FTDM_LOG_
ERROR
,
"[RELAY] Channel UP: tx procId %d: channel %d
\n
"
,
ftdm_log
(
FTDM_LOG_
INFO
,
"[RELAY] Channel UP: tx procId %d: channel %d
\n
"
,
sta
->
t
.
usta
.
s
.
ryUpUsta
.
sendPid
,
sta
->
t
.
usta
.
s
.
ryUpUsta
.
sendPid
,
sta
->
t
.
usta
.
s
.
ryUpUsta
.
id
);
sta
->
t
.
usta
.
s
.
ryUpUsta
.
id
);
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
浏览文件 @
fc997aae
...
@@ -1651,6 +1651,7 @@ static ftdm_status_t ftdm_sangoma_ss7_start(ftdm_span_t * span)
...
@@ -1651,6 +1651,7 @@ static ftdm_status_t ftdm_sangoma_ss7_start(ftdm_span_t * span)
static
ftdm_status_t
ftdm_sangoma_ss7_stop
(
ftdm_span_t
*
span
)
static
ftdm_status_t
ftdm_sangoma_ss7_stop
(
ftdm_span_t
*
span
)
{
{
/*this function is called by the FT-Core to stop this span */
/*this function is called by the FT-Core to stop this span */
int
timeout
=
0
;
ftdm_log
(
FTDM_LOG_INFO
,
"Stopping span %s:%u.
\n
"
,
span
->
name
,
span
->
span_id
);
ftdm_log
(
FTDM_LOG_INFO
,
"Stopping span %s:%u.
\n
"
,
span
->
name
,
span
->
span_id
);
...
@@ -1659,10 +1660,17 @@ static ftdm_status_t ftdm_sangoma_ss7_stop(ftdm_span_t * span)
...
@@ -1659,10 +1660,17 @@ static ftdm_status_t ftdm_sangoma_ss7_stop(ftdm_span_t * span)
/* wait for the thread to stop */
/* wait for the thread to stop */
while
(
ftdm_test_flag
(
span
,
FTDM_SPAN_IN_THREAD
))
{
while
(
ftdm_test_flag
(
span
,
FTDM_SPAN_IN_THREAD
))
{
ftdm_log
(
FTDM_LOG_DEBUG
,
"Waiting for monitor thread to end for %s:%u.
\n
"
,
ftdm_set_flag
(
span
,
FTDM_SPAN_STOP_THREAD
);
ftdm_log
(
FTDM_LOG_DEBUG
,
"Waiting for monitor thread to end for %s:%u. [flags=0x%08X]
\n
"
,
span
->
name
,
span
->
name
,
span
->
span_id
);
span
->
span_id
,
ftdm_sleep
(
1
);
span
->
flags
);
/* Wait 50ms */
ftdm_sleep
(
50
);
timeout
++
;
/* timeout after 5 sec, better to crash than hang */
ftdm_assert_return
(
timeout
<
100
,
FTDM_FALSE
,
"SS7 Span stop timeout!
\n
"
);
}
}
/* KONRAD FIX ME - deconfigure any circuits, links, attached to this span */
/* KONRAD FIX ME - deconfigure any circuits, links, attached to this span */
...
@@ -1725,12 +1733,14 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_ss7_span_config)
...
@@ -1725,12 +1733,14 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_ss7_span_config)
/* parse the configuration and apply to the global config structure */
/* parse the configuration and apply to the global config structure */
if
(
ftmod_ss7_parse_xml
(
ftdm_parameters
,
span
))
{
if
(
ftmod_ss7_parse_xml
(
ftdm_parameters
,
span
))
{
ftdm_log
(
FTDM_LOG_CRIT
,
"Failed to parse configuration!
\n
"
);
ftdm_log
(
FTDM_LOG_CRIT
,
"Failed to parse configuration!
\n
"
);
ftdm_sleep
(
1000
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
/* configure libsngss7 */
/* configure libsngss7 */
if
(
ft_to_sngss7_cfg_all
())
{
if
(
ft_to_sngss7_cfg_all
())
{
ftdm_log
(
FTDM_LOG_CRIT
,
"Failed to configure LibSngSS7!
\n
"
);
ftdm_log
(
FTDM_LOG_CRIT
,
"Failed to configure LibSngSS7!
\n
"
);
ftdm_sleep
(
1000
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
浏览文件 @
fc997aae
...
@@ -915,7 +915,7 @@ if (ftdmchan->state == new_state) { \
...
@@ -915,7 +915,7 @@ if (ftdmchan->state == new_state) { \
#define SS7_ERROR_CHAN(fchan, msg, args...) ftdm_log_chan(fchan, FTDM_LOG_ERROR, msg , ##args)
#define SS7_ERROR_CHAN(fchan, msg, args...) ftdm_log_chan(fchan, FTDM_LOG_ERROR, msg , ##args)
#define SS7_CTRIT_CHAN(fchan, msg, args...) ftdm_log_chan(fchan, FTDM_LOG_CRIT, msg , ##args)
#define SS7_CTRIT_CHAN(fchan, msg, args...) ftdm_log_chan(fchan, FTDM_LOG_CRIT, msg , ##args)
#ifdef
KONRAD
_DEVEL
#ifdef
SS7_CODE
_DEVEL
#define SS7_DEVEL_DEBUG(a,...) ftdm_log(FTDM_LOG_DEBUG,a,##__VA_ARGS__ );
#define SS7_DEVEL_DEBUG(a,...) ftdm_log(FTDM_LOG_DEBUG,a,##__VA_ARGS__ );
#else
#else
#define SS7_DEVEL_DEBUG(a,...)
#define SS7_DEVEL_DEBUG(a,...)
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
浏览文件 @
fc997aae
...
@@ -922,11 +922,6 @@ int check_for_state_change(ftdm_channel_t *ftdmchan)
...
@@ -922,11 +922,6 @@ int check_for_state_change(ftdm_channel_t *ftdmchan)
/******************************************************************************/
/******************************************************************************/
ftdm_status_t
extract_chan_data
(
uint32_t
circuit
,
sngss7_chan_data_t
**
sngss7_info
,
ftdm_channel_t
**
ftdmchan
)
ftdm_status_t
extract_chan_data
(
uint32_t
circuit
,
sngss7_chan_data_t
**
sngss7_info
,
ftdm_channel_t
**
ftdmchan
)
{
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
obj
==
NULL
)
{
SS7_ERROR
(
"sngss7_info is Null for circuit #%d
\n
"
,
circuit
);
return
FTDM_FAIL
;
}
if
(
!
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
obj
)
{
if
(
!
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
obj
)
{
SS7_ERROR
(
"No ss7 info for circuit #%d
\n
"
,
circuit
);
SS7_ERROR
(
"No ss7 info for circuit #%d
\n
"
,
circuit
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
...
@@ -935,8 +930,19 @@ ftdm_status_t extract_chan_data(uint32_t circuit, sngss7_chan_data_t **sngss7_in
...
@@ -935,8 +930,19 @@ ftdm_status_t extract_chan_data(uint32_t circuit, sngss7_chan_data_t **sngss7_in
*
sngss7_info
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
obj
;
*
sngss7_info
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
obj
;
if
(
!
(
*
sngss7_info
)
->
ftdmchan
)
{
if
(
!
(
*
sngss7_info
)
->
ftdmchan
)
{
SS7_ERROR
(
"No channel for circuit #%d
\n
"
,
circuit
);
SS7_ERROR
(
"No ftdmchan for circuit #%d
\n
"
,
circuit
);
return
FTDM_FAIL
;
}
if
(
!
(
*
sngss7_info
)
->
ftdmchan
->
span
)
{
SS7_CRITICAL
(
"ftdmchan->span = NULL for circuit #%d
\n
"
,
circuit
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
if
(
!
(
*
sngss7_info
)
->
ftdmchan
->
span
->
signal_data
)
{
SS7_CRITICAL
(
"ftdmchan->span->signal_data = NULL for circuit #%d
\n
"
,
circuit
);
return
FTDM_FAIL
;
}
}
*
ftdmchan
=
(
*
sngss7_info
)
->
ftdmchan
;
*
ftdmchan
=
(
*
sngss7_info
)
->
ftdmchan
;
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c
浏览文件 @
fc997aae
...
@@ -2877,7 +2877,7 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
...
@@ -2877,7 +2877,7 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
chan
==
count
))
{
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
chan
==
count
))
{
/* we are processing a circuit that already exists */
/* we are processing a circuit that already exists */
SS7_DEBUG
(
"Found an existing circuit %d, ccSpanId=%d, chan%d
\n
"
,
SS7_DE
VEL_DE
BUG
(
"Found an existing circuit %d, ccSpanId=%d, chan%d
\n
"
,
x
,
x
,
ccSpan
->
id
,
ccSpan
->
id
,
count
);
count
);
...
@@ -2886,7 +2886,7 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
...
@@ -2886,7 +2886,7 @@ static int ftmod_ss7_fill_in_ccSpan(sng_ccSpan_t *ccSpan)
flag
=
1
;
flag
=
1
;
/* not supporting reconfig at this time */
/* not supporting reconfig at this time */
SS7_DEBUG
(
"Not supporting ckt reconfig at this time!
\n
"
);
SS7_DE
VEL_DE
BUG
(
"Not supporting ckt reconfig at this time!
\n
"
);
goto
move_along
;
goto
move_along
;
}
else
{
}
else
{
/* this is not the droid you are looking for */
/* this is not the droid you are looking for */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论