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
48be0501
Commit
48be0501
authored
Nov 09, 2016
by
Ghislain MARY
Browse files
Fix crash in dual resolver notify if it has been cancelled.
parent
6a36bb0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/belle_sip_resolver.c
src/belle_sip_resolver.c
+9
-7
No files found.
src/belle_sip_resolver.c
View file @
48be0501
...
...
@@ -1035,8 +1035,16 @@ static belle_sip_resolver_context_t * belle_sip_stack_resolve_single(belle_sip_s
return
(
belle_sip_resolver_context_t
*
)
resolver_start_query
(
ctx
);
}
static
uint8_t
belle_sip_resolver_context_can_be_cancelled
(
belle_sip_resolver_context_t
*
obj
)
{
return
((
obj
->
cancelled
==
TRUE
)
||
(
obj
->
notified
==
TRUE
))
?
FALSE
:
TRUE
;
}
#define belle_sip_resolver_context_can_be_notified(obj) belle_sip_resolver_context_can_be_cancelled(obj)
static
void
dual_resolver_context_check_finished
(
belle_sip_dual_resolver_context_t
*
ctx
)
{
if
(
belle_sip_resolver_context_notified
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
->
a_ctx
))
&&
belle_sip_resolver_context_notified
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
->
aaaa_ctx
)))
{
if
(
belle_sip_resolver_context_can_be_notified
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
))
&&
(
ctx
->
a_ctx
!=
NULL
)
&&
belle_sip_resolver_context_notified
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
->
a_ctx
))
&&
(
ctx
->
aaaa_ctx
!=
NULL
)
&&
belle_sip_resolver_context_notified
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
->
aaaa_ctx
)))
{
belle_sip_resolver_context_notify
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
));
}
}
...
...
@@ -1113,12 +1121,6 @@ belle_sip_resolver_context_t * belle_sip_stack_resolve_srv(belle_sip_stack_t *st
return
(
belle_sip_resolver_context_t
*
)
resolver_start_query
(
ctx
);
}
static
uint8_t
belle_sip_resolver_context_can_be_cancelled
(
belle_sip_resolver_context_t
*
obj
)
{
return
((
obj
->
cancelled
==
TRUE
)
||
(
obj
->
notified
==
TRUE
))
?
FALSE
:
TRUE
;
}
#define belle_sip_resolver_context_can_be_notified(obj) belle_sip_resolver_context_can_be_cancelled(obj)
void
belle_sip_resolver_context_cancel
(
belle_sip_resolver_context_t
*
obj
)
{
if
(
belle_sip_resolver_context_can_be_cancelled
(
obj
))
{
obj
->
cancelled
=
TRUE
;
...
...
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