Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8e78ca69
提交
8e78ca69
authored
12月 07, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some missing macros to typically disabled stun code
上级
e8bc08b7
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
.update
libs/sofia-sip/.update
+1
-1
nua_register.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
+1
-1
stun.c
libs/sofia-sip/libsofia-sip-ua/stun/stun.c
+12
-12
stun_common.c
libs/sofia-sip/libsofia-sip-ua/stun/stun_common.c
+2
-2
没有找到文件。
libs/sofia-sip/.update
浏览文件 @
8e78ca69
Tue Nov 13 15:22:19
CST 2012
Fri Dec 7 08:42:32
CST 2012
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
浏览文件 @
8e78ca69
...
@@ -1190,7 +1190,7 @@ nua_stack_init_transport(nua_t *nua, tagi_t const *tags)
...
@@ -1190,7 +1190,7 @@ nua_stack_init_transport(nua_t *nua, tagi_t const *tags)
TPTAG_PUBLIC
(
tport_type_stun
),
/* use stun */
TPTAG_PUBLIC
(
tport_type_stun
),
/* use stun */
TPTAG_CERTIFICATE
(
certificate_dir
),
TPTAG_CERTIFICATE
(
certificate_dir
),
TAG_NEXT
(
nua
->
nua_args
))
<
0
)
{
TAG_NEXT
(
nua
->
nua_args
))
<
0
)
{
SU_DEBUG_0
((
"nua: error initializing STUN transport
\n
"
));
SU_DEBUG_0
((
"nua: error initializing STUN transport
\n
"
VA_NONE
));
}
}
#endif
#endif
}
}
...
...
libs/sofia-sip/libsofia-sip-ua/stun/stun.c
浏览文件 @
8e78ca69
...
@@ -552,7 +552,7 @@ int stun_obtain_shared_secret(stun_handle_t *sh,
...
@@ -552,7 +552,7 @@ int stun_obtain_shared_secret(stun_handle_t *sh,
ta_list
ta
;
ta_list
ta
;
ta_start
(
ta
,
tag
,
value
);
ta_start
(
ta
,
tag
,
value
);
SU_DEBUG_5
((
"Delaying STUN shared-secret req. for DNS-SRV query.
\n
"
));
SU_DEBUG_5
((
"Delaying STUN shared-secret req. for DNS-SRV query.
\n
"
VA_NONE
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_tls_query
,
sdf
,
magic
,
ta_tags
(
ta
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_tls_query
,
sdf
,
magic
,
ta_tags
(
ta
));
ta_end
(
ta
);
ta_end
(
ta
);
...
@@ -565,7 +565,7 @@ int stun_obtain_shared_secret(stun_handle_t *sh,
...
@@ -565,7 +565,7 @@ int stun_obtain_shared_secret(stun_handle_t *sh,
SU_DEBUG_3
((
"%s: Obtaining shared secret.
\n
"
,
__func__
));
SU_DEBUG_3
((
"%s: Obtaining shared secret.
\n
"
,
__func__
));
}
}
else
{
else
{
SU_DEBUG_3
((
"No message integrity enabled.
\n
"
));
SU_DEBUG_3
((
"No message integrity enabled.
\n
"
VA_NONE
));
return
errno
=
EFAULT
,
-
1
;
return
errno
=
EFAULT
,
-
1
;
}
}
...
@@ -928,12 +928,12 @@ static void priv_lookup_cb(stun_dns_lookup_t *self,
...
@@ -928,12 +928,12 @@ static void priv_lookup_cb(stun_dns_lookup_t *self,
break
;
break
;
default:
default:
SU_DEBUG_5
((
"Warning: unknown pending STUN DNS-SRV action.
\n
"
));
SU_DEBUG_5
((
"Warning: unknown pending STUN DNS-SRV action.
\n
"
VA_NONE
));
}
}
}
}
else
{
else
{
/* DNS lookup failed */
/* DNS lookup failed */
SU_DEBUG_5
((
"Warning: STUN DNS-SRV lookup failed.
\n
"
));
SU_DEBUG_5
((
"Warning: STUN DNS-SRV lookup failed.
\n
"
VA_NONE
));
if
(
sh
->
sh_dns_pend_cb
)
{
if
(
sh
->
sh_dns_pend_cb
)
{
sh
->
sh_dns_pend_cb
(
sh
->
sh_dns_pend_ctx
,
sh
,
NULL
,
sh
->
sh_dns_pend_cb
(
sh
->
sh_dns_pend_ctx
,
sh
,
NULL
,
sh
->
sh_dns_pend_action
,
stun_error
);
sh
->
sh_dns_pend_action
,
stun_error
);
...
@@ -1045,7 +1045,7 @@ int stun_bind(stun_handle_t *sh,
...
@@ -1045,7 +1045,7 @@ int stun_bind(stun_handle_t *sh,
int
err
;
int
err
;
ta_list
ta
;
ta_list
ta
;
ta_start
(
ta
,
tag
,
value
);
ta_start
(
ta
,
tag
,
value
);
SU_DEBUG_5
((
"Delaying STUN bind for DNS-SRV query.
\n
"
));
SU_DEBUG_5
((
"Delaying STUN bind for DNS-SRV query.
\n
"
VA_NONE
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_binding_request
,
sdf
,
magic
,
ta_tags
(
ta
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_binding_request
,
sdf
,
magic
,
ta_tags
(
ta
));
ta_end
(
ta
);
ta_end
(
ta
);
return
err
;
return
err
;
...
@@ -1201,7 +1201,7 @@ int stun_test_nattype(stun_handle_t *sh,
...
@@ -1201,7 +1201,7 @@ int stun_test_nattype(stun_handle_t *sh,
ta_list
ta
;
ta_list
ta
;
ta_start
(
ta
,
tag
,
value
);
ta_start
(
ta
,
tag
,
value
);
SU_DEBUG_5
((
"Delaying STUN get-nat-type req. for DNS-SRV query.
\n
"
));
SU_DEBUG_5
((
"Delaying STUN get-nat-type req. for DNS-SRV query.
\n
"
VA_NONE
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_test_nattype
,
sdf
,
magic
,
ta_tags
(
ta
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_test_nattype
,
sdf
,
magic
,
ta_tags
(
ta
));
ta_end
(
ta
);
ta_end
(
ta
);
...
@@ -1453,7 +1453,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
...
@@ -1453,7 +1453,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
su_root_eventmask
(
self
->
sh_root
,
sd
->
sd_index
,
su_root_eventmask
(
self
->
sh_root
,
sd
->
sd_index
,
sd
->
sd_socket
,
events
);
sd
->
sd_socket
,
events
);
SU_DEBUG_5
((
"Shared Secret Request sent to server:
\n
"
));
SU_DEBUG_5
((
"Shared Secret Request sent to server:
\n
"
VA_NONE
));
debug_print
(
&
msg_req
->
enc_buf
);
debug_print
(
&
msg_req
->
enc_buf
);
z
=
SSL_read
(
ssl
,
buf
,
sizeof
(
buf
));
z
=
SSL_read
(
ssl
,
buf
,
sizeof
(
buf
));
...
@@ -1472,7 +1472,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
...
@@ -1472,7 +1472,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
resp
->
enc_buf
.
size
=
z
;
resp
->
enc_buf
.
size
=
z
;
resp
->
enc_buf
.
data
=
malloc
(
z
);
resp
->
enc_buf
.
data
=
malloc
(
z
);
memcpy
(
resp
->
enc_buf
.
data
,
buf
,
z
);
memcpy
(
resp
->
enc_buf
.
data
,
buf
,
z
);
SU_DEBUG_5
((
"Shared Secret Response received from server:
\n
"
));
SU_DEBUG_5
((
"Shared Secret Response received from server:
\n
"
VA_NONE
));
debug_print
(
&
resp
->
enc_buf
);
debug_print
(
&
resp
->
enc_buf
);
/* closed TLS connection */
/* closed TLS connection */
...
@@ -1505,7 +1505,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
...
@@ -1505,7 +1505,7 @@ int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
case
SHARED_SECRET_ERROR_RESPONSE
:
case
SHARED_SECRET_ERROR_RESPONSE
:
if
(
stun_process_error_response
(
resp
)
<
0
)
{
if
(
stun_process_error_response
(
resp
)
<
0
)
{
SU_DEBUG_5
((
"Error in Shared Secret Error Response.
\n
"
));
SU_DEBUG_5
((
"Error in Shared Secret Error Response.
\n
"
VA_NONE
));
}
}
stun_free_buffer
(
&
resp
->
enc_buf
);
stun_free_buffer
(
&
resp
->
enc_buf
);
return
-
1
;
return
-
1
;
...
@@ -1755,7 +1755,7 @@ static int do_action(stun_handle_t *sh, stun_msg_t *msg)
...
@@ -1755,7 +1755,7 @@ static int do_action(stun_handle_t *sh, stun_msg_t *msg)
id
=
msg
->
stun_hdr
.
tran_id
;
id
=
msg
->
stun_hdr
.
tran_id
;
req
=
find_request
(
sh
,
id
);
req
=
find_request
(
sh
,
id
);
if
(
!
req
)
{
if
(
!
req
)
{
SU_DEBUG_7
((
"warning: unable to find matching TID for response
\n
"
));
SU_DEBUG_7
((
"warning: unable to find matching TID for response
\n
"
VA_NONE
));
return
0
;
return
0
;
}
}
...
@@ -2205,7 +2205,7 @@ static int action_determine_nattype(stun_request_t *req, stun_msg_t *binding_res
...
@@ -2205,7 +2205,7 @@ static int action_determine_nattype(stun_request_t *req, stun_msg_t *binding_res
if
(
err
<
0
)
{
if
(
err
<
0
)
{
SU_DEBUG_0
((
"WARNING: Failure in performing STUN Test-IV check. "
SU_DEBUG_0
((
"WARNING: Failure in performing STUN Test-IV check. "
"The results related to mapping characteristics may be incorrect."
));
"The results related to mapping characteristics may be incorrect."
VA_NONE
));
stun_free_message
(
req
->
sr_msg
);
stun_free_message
(
req
->
sr_msg
);
sd
->
sd_fourth
=
-
1
;
sd
->
sd_fourth
=
-
1
;
/* call function again, sd_fourth stops the recursion */
/* call function again, sd_fourth stops the recursion */
...
@@ -2696,7 +2696,7 @@ int stun_test_lifetime(stun_handle_t *sh,
...
@@ -2696,7 +2696,7 @@ int stun_test_lifetime(stun_handle_t *sh,
ta_list
ta
;
ta_list
ta
;
ta_start
(
ta
,
tag
,
value
);
ta_start
(
ta
,
tag
,
value
);
SU_DEBUG_5
((
"Delaying STUN get-lifetime req. for DNS-SRV query.
\n
"
));
SU_DEBUG_5
((
"Delaying STUN get-lifetime req. for DNS-SRV query.
\n
"
VA_NONE
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_test_lifetime
,
sdf
,
magic
,
ta_tags
(
ta
));
err
=
priv_dns_queue_action
(
sh
,
stun_action_test_lifetime
,
sdf
,
magic
,
ta_tags
(
ta
));
ta_end
(
ta
);
ta_end
(
ta
);
...
...
libs/sofia-sip/libsofia-sip-ua/stun/stun_common.c
浏览文件 @
8e78ca69
...
@@ -558,9 +558,9 @@ void debug_print(stun_buffer_t *buf) {
...
@@ -558,9 +558,9 @@ void debug_print(stun_buffer_t *buf) {
*
(
buf
->
data
+
i
*
4
+
2
),
*
(
buf
->
data
+
i
*
4
+
2
),
*
(
buf
->
data
+
i
*
4
+
3
)));
*
(
buf
->
data
+
i
*
4
+
3
)));
if
(
i
==
4
)
if
(
i
==
4
)
SU_DEBUG_9
((
"---------------------
\n
"
));
SU_DEBUG_9
((
"---------------------
\n
"
VA_NONE
));
}
}
SU_DEBUG_9
((
"
\n
"
));
SU_DEBUG_9
((
"
\n
"
VA_NONE
));
}
}
int
stun_init_message
(
stun_msg_t
*
msg
)
{
int
stun_init_message
(
stun_msg_t
*
msg
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论