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
belle-sip
Commits
efc06611
Commit
efc06611
authored
Oct 29, 2013
by
Simon Morlat
Browse files
prevent looping when a response to a refresher request contains expires:0
parent
79301d72
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/refresher.c
View file @
efc06611
...
...
@@ -536,9 +536,14 @@ static int set_expires_from_trans(belle_sip_refresher_t* refresher) {
refresher
->
obtained_expires
=
belle_sip_header_expires_get_expires
(
expires_header
);
}
}
if
(
refresher
->
obtained_expires
<
0
)
{
if
(
refresher
->
obtained_expires
==-
1
)
{
belle_sip_message
(
"Neither Expires header nor corresponding Contact header found, checking from original request"
);
refresher
->
obtained_expires
=
refresher
->
target_expires
;
}
else
if
(
refresher
->
target_expires
>
0
&&
refresher
->
obtained_expires
==
0
){
/*check this case because otherwise we are going to loop fast in sending refresh requests.*/
belle_sip_warning
(
"Server replied with 0 expires, what does this mean ?"
);
/*suppose it's a server bug and assume our target_expires is understood.*/
refresher
->
obtained_expires
=
refresher
->
target_expires
;
}
}
else
if
(
strcmp
(
"INVITE"
,
belle_sip_request_get_method
(
request
))
==
0
)
{
belle_sip_error
(
"Refresher does not support INVITE yet"
);
...
...
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