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
10edae57
Commit
10edae57
authored
Oct 31, 2013
by
jehan
Browse files
remove auth context in case of 401|407|403
parent
8290c5af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/provider.c
src/provider.c
+13
-0
No files found.
src/provider.c
View file @
10edae57
...
...
@@ -122,9 +122,22 @@ static void belle_sip_provider_dispatch_request(belle_sip_provider_t* prov, bell
}
}
static
belle_sip_list_t
*
belle_sip_provider_get_auth_context_by_call_id
(
belle_sip_provider_t
*
p
,
belle_sip_header_call_id_t
*
call_id
);
static
void
belle_sip_provider_dispatch_response
(
belle_sip_provider_t
*
prov
,
belle_sip_response_t
*
msg
){
belle_sip_client_transaction_t
*
t
;
t
=
belle_sip_provider_find_matching_client_transaction
(
prov
,
msg
);
/*good opportunity to cleanup auth context if answer = 401|407|403*/
switch
(
belle_sip_response_get_status_code
(
msg
))
{
case
401
:
case
403
:
case
407
:
{
belle_sip_header_call_id_t
*
call_id
=
call_id
=
belle_sip_message_get_header_by_type
(
msg
,
belle_sip_header_call_id_t
);
belle_sip_list_free_with_data
(
belle_sip_provider_get_auth_context_by_call_id
(
prov
,
call_id
),
belle_sip_object_unref
);
}
}
/*
* If a transaction is found, pass it to the transaction and let it decide what to do.
* Else notifies directly.
...
...
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