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
43258541
Commit
43258541
authored
Feb 11, 2014
by
Simon Morlat
Browse files
fix double notification of auth_info_requested()
parent
aacd7bb5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
coreapi/callbacks.c
coreapi/callbacks.c
+5
-3
tester/register_tester.c
tester/register_tester.c
+3
-3
No files found.
coreapi/callbacks.c
View file @
43258541
...
...
@@ -727,10 +727,12 @@ static void auth_failure(SalOp *op, SalAuthInfo* info) {
LinphoneAuthInfo
*
ai
=
(
LinphoneAuthInfo
*
)
linphone_core_find_auth_info
(
lc
,
info
->
realm
,
info
->
username
,
info
->
domain
);
if
(
ai
){
ms_message
(
"%s/%s/%s authentication fails."
,
info
->
realm
,
info
->
username
,
info
->
domain
);
}
/*ask again for password if auth info was already supplied but apparently not working*/
if
(
lc
->
vtable
.
auth_info_requested
)
{
lc
->
vtable
.
auth_info_requested
(
lc
,
info
->
realm
,
info
->
username
,
info
->
domain
);
}
}
}
static
void
register_success
(
SalOp
*
op
,
bool_t
registered
){
...
...
tester/register_tester.c
View file @
43258541
...
...
@@ -304,7 +304,7 @@ static void authenticated_register_with_late_credentials(){
counters
=
get_stats
(
mgr
->
lc
);
register_with_refresh_base_2
(
mgr
->
lc
,
FALSE
,
auth_domain
,
route
,
TRUE
,
transport
);
CU_ASSERT_EQUAL
(
counters
->
number_of_auth_info_requested
,
2
);
/*1 registration error = 2 auth requested*/
CU_ASSERT_EQUAL
(
counters
->
number_of_auth_info_requested
,
1
);
linphone_core_manager_destroy
(
mgr
);
}
...
...
@@ -314,7 +314,7 @@ static void authenticated_register_with_wrong_late_credentials(){
LCSipTransports
transport
=
{
5070
,
5070
,
0
,
5071
};
char
route
[
256
];
const
char
*
saved_test_passwd
=
test_password
;
char
*
wrong_passwd
=
"mot de pass tout pourri
t
"
;
char
*
wrong_passwd
=
"mot de pass tout pourri"
;
test_password
=
wrong_passwd
;
...
...
@@ -324,7 +324,7 @@ static void authenticated_register_with_wrong_late_credentials(){
counters
=
get_stats
(
mgr
->
lc
);
register_with_refresh_base_3
(
mgr
->
lc
,
FALSE
,
auth_domain
,
route
,
TRUE
,
transport
,
LinphoneRegistrationFailed
);
CU_ASSERT_EQUAL
(
counters
->
number_of_auth_info_requested
,
3
);
CU_ASSERT_EQUAL
(
counters
->
number_of_auth_info_requested
,
2
);
CU_ASSERT_EQUAL
(
counters
->
number_of_LinphoneRegistrationFailed
,
2
);
CU_ASSERT_EQUAL
(
counters
->
number_of_LinphoneRegistrationProgress
,
2
);
test_password
=
saved_test_passwd
;
...
...
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