Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
sofia-sip
Commits
ed98d6b8
Commit
ed98d6b8
authored
Mar 29, 2006
by
Pekka Pessi
Browse files
Changed outbound_connect_nat_detect() prototype.
darcs-hash:20060329170248-65a35-df81133e8882732a3fae26fb1855b593630f545f.gz
parent
6703c467
Changes
1
Hide whitespace changes
Inline
Side-by-side
libsofia-sip-ua/nua/nua_register.c
View file @
ed98d6b8
...
...
@@ -746,7 +746,7 @@ refresh_register(nua_handle_t *nh, nua_dialog_usage_t *du, sip_time_t now)
if
(
sip
)
{
int
unregistering
=
now
==
0
;
sip_contact_t
*
contact
,
*
previous
;
sip_contact_t
*
contact
=
NULL
,
*
previous
=
NULL
;
if
(
unregistering
)
unregister_expires_contacts
(
msg
,
sip
);
...
...
@@ -988,7 +988,6 @@ int outbound_connect_check_for_nat(struct outbound_connect *oc,
nta_outgoing_t
*
orq
,
sip_t
const
*
sip
)
{
sip_via_t
*
v
=
sip
->
sip_via
;
int
binding_changed
;
sip_contact_t
*
m
=
oc
->
oc_rcontact
;
...
...
@@ -1016,7 +1015,7 @@ int outbound_connect_check_for_nat(struct outbound_connect *oc,
}
#endif
binding_changed
=
outbound_connect_nat_detect
(
oc
,
v
);
binding_changed
=
outbound_connect_nat_detect
(
oc
,
sip
);
/* Contact was set by application, do not change it */
if
(
oc
->
oc_by_application
)
...
...
@@ -1058,8 +1057,12 @@ int outbound_connect_check_for_nat(struct outbound_connect *oc,
return
0
;
}
/** Based on "received" and possible "rport" parameters, check and update
* our NAT status.
/**@internal
*
* Detect NAT.
*
* Based on "received" and possible "rport" parameters in the top-most Via,
* check and update our NAT status.
*
* @retval 2 change in public NAT binding detected
* @retval 1 NAT binding detected
...
...
@@ -1068,8 +1071,9 @@ int outbound_connect_check_for_nat(struct outbound_connect *oc,
*/
static
int
outbound_connect_nat_detect
(
outbound_connect
*
oc
,
sip_
via_
t
const
*
v
)
sip_t
const
*
response
)
{
sip_via_t
const
*
v
=
response
->
sip_via
;
int
one
=
1
;
char
const
*
received
,
*
rport
;
char
*
nat_detected
,
*
nat_port
;
...
...
@@ -1283,7 +1287,7 @@ static int response_to_keepalive_options(nua_owner_t *oc_casted_as_owner,
return
0
;
}
binding_check
=
outbound_connect_nat_detect
(
oc
,
sip
->
sip_via
);
binding_check
=
outbound_connect_nat_detect
(
oc
,
sip
);
if
(
binding_check
>
1
)
{
/* Bindings have changed */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment