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
liblinphone
Commits
3a62d27f
Commit
3a62d27f
authored
Jun 07, 2018
by
Simon Morlat
Browse files
Fix potential crash (rare)
parent
1325fbe0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sal/op.cpp
View file @
3a62d27f
...
...
@@ -459,11 +459,17 @@ int SalOp::getAddressFamily() const {
if
(
mRefresher
)
{
belle_sip_response_t
*
resp
=
belle_sip_transaction_get_response
(
tr
);
belle_sip_header_via_t
*
via
=
resp
?
belle_sip_message_get_header_by_type
(
resp
,
belle_sip_header_via_t
)
:
NULL
;
const
char
*
host
;
if
(
!
via
){
ms_error
(
"Unable to determine IP version from signaling operation, no via header found."
);
return
AF_UNSPEC
;
}
return
(
strchr
(
belle_sip_header_via_get_host
(
via
),
':'
)
!=
NULL
)
?
AF_INET6
:
AF_INET
;
host
=
belle_sip_header_via_get_host
(
via
);
if
(
!
host
){
ms_error
(
"Unable to determine IP version from signaling operation, no via header is not yet completed."
);
return
AF_UNSPEC
;
}
return
(
strchr
(
host
,
':'
)
!=
NULL
)
?
AF_INET6
:
AF_INET
;
}
else
{
belle_sip_request_t
*
req
=
belle_sip_transaction_get_request
(
tr
);
contact
=
(
belle_sip_header_address_t
*
)
belle_sip_message_get_header_by_type
(
req
,
belle_sip_header_contact_t
);
...
...
François Grisez
@fgrisez
mentioned in commit
5ccf17df
·
Jun 26, 2018
mentioned in commit
5ccf17df
mentioned in commit 5ccf17dfafc820ead13577a082cf6b3e6f00cce3
Toggle commit list
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