Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
7e55281e
Commit
7e55281e
authored
Sep 04, 2018
by
Matthieu Tanon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add authentication callback for remote provisioning
parent
6da310cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
coreapi/remote_provisioning.c
coreapi/remote_provisioning.c
+17
-1
No files found.
coreapi/remote_provisioning.c
View file @
7e55281e
...
...
@@ -67,7 +67,23 @@ static void belle_request_process_timeout(void *ctx, const belle_sip_timeout_eve
static
void
belle_request_process_auth_requested
(
void
*
ctx
,
belle_sip_auth_event_t
*
event
)
{
LinphoneCore
*
lc
=
(
LinphoneCore
*
)
ctx
;
linphone_configuring_terminated
(
lc
,
LinphoneConfiguringFailed
,
"http auth requested"
);
const
char
*
realm
=
belle_sip_auth_event_get_realm
(
event
);
const
char
*
username
=
belle_sip_auth_event_get_username
(
event
);
const
char
*
domain
=
belle_sip_auth_event_get_domain
(
event
);
const
LinphoneAuthInfo
*
auth_info
=
linphone_core_find_auth_info
(
lc
,
realm
,
username
,
domain
);
if
(
auth_info
)
{
const
char
*
auth_username
=
linphone_auth_info_get_username
(
auth_info
);
const
char
*
auth_password
=
linphone_auth_info_get_password
(
auth_info
);
const
char
*
auth_ha1
=
linphone_auth_info_get_ha1
(
auth_info
);
belle_sip_auth_event_set_username
(
event
,
auth_username
);
belle_sip_auth_event_set_passwd
(
event
,
auth_password
);
belle_sip_auth_event_set_ha1
(
event
,
auth_ha1
);
}
else
{
linphone_configuring_terminated
(
lc
,
LinphoneConfiguringFailed
,
"http auth requested"
);
}
}
int
linphone_remote_provisioning_download_and_apply
(
LinphoneCore
*
lc
,
const
char
*
remote_provisioning_uri
)
{
...
...
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