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
91578579
Commit
91578579
authored
Sep 23, 2015
by
Simon Morlat
Browse files
fix bug when re-enqueuing http requests on a channel after the original one closed.
parent
09decef5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
src/channel.c
src/channel.c
+1
-0
src/http-provider.c
src/http-provider.c
+5
-0
No files found.
src/channel.c
View file @
91578579
...
...
@@ -1255,6 +1255,7 @@ static void channel_res_done(void *data, const char *name, struct addrinfo *ai_l
}
void
belle_sip_channel_resolve
(
belle_sip_channel_t
*
obj
){
belle_sip_message
(
"channel [%p]: starting resolution of %s"
,
obj
,
obj
->
peer_name
);
channel_set_state
(
obj
,
BELLE_SIP_CHANNEL_RES_IN_PROGRESS
);
if
(
belle_sip_stack_dns_srv_enabled
(
obj
->
stack
)
&&
obj
->
lp
!=
NULL
)
obj
->
resolver_ctx
=
belle_sip_stack_resolve
(
obj
->
stack
,
belle_sip_channel_get_transport_name_lower_case
(
obj
),
obj
->
peer_name
,
obj
->
peer_port
,
obj
->
ai_family
,
channel_res_done
,
obj
);
...
...
src/http-provider.c
View file @
91578579
...
...
@@ -464,6 +464,11 @@ void belle_http_provider_cancel_request(belle_http_provider_t *obj, belle_http_r
if
(
req
->
channel
){
// Keep the list of the outgoing messages of the channel...
outgoing_messages
=
belle_sip_list_copy_with_data
(
req
->
channel
->
outgoing_messages
,(
void
*
(
*
)(
void
*
))
belle_sip_object_ref
);
if
(
outgoing_messages
->
data
==
req
){
/*our request didn't go out; so drop it.*/
outgoing_messages
=
belle_sip_list_remove
(
outgoing_messages
,
req
);
belle_sip_object_unref
(
req
);
}
/*protect the channel from being destroyed before removing it (removing it will unref it)*/
belle_sip_object_ref
(
req
->
channel
);
provider_remove_channel
(
obj
,
req
->
channel
);
...
...
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