Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblinphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
liblinphone
Commits
a1bbb890
Commit
a1bbb890
authored
Nov 29, 2013
by
Guillaume BIENKOWSKI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Progress
parent
f5c9d60d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
ldapprovider.c
coreapi/ldap/ldapprovider.c
+17
-2
No files found.
coreapi/ldap/ldapprovider.c
View file @
a1bbb890
...
...
@@ -212,6 +212,17 @@ static unsigned int linphone_ldap_cancel_search(LinphoneContactProvider* obj, Li
return
ret
;
}
static
int
linphone_ldap_parse_bind_results
(
LinphoneContactProvider
*
obj
,
LDAPMessage
*
results
)
{
LinphoneLDAPContactProvider
*
cp
=
LINPHONE_LDAP_CONTACT_PROVIDER
(
obj
);
struct
berval
*
servercreds
;
int
ret
=
ldap_parse_sasl_bind_result
(
cp
->
ld
,
results
,
&
servercreds
,
1
);
if
(
ret
!=
LDAP_SUCCESS
){
ms_error
(
"ldap_parse_sasl_bind_result failed"
)
}
return
ret
;
}
static
bool_t
linphone_ldap_contact_provider_iterate
(
void
*
data
)
{
LinphoneLDAPContactProvider
*
obj
=
LINPHONE_LDAP_CONTACT_PROVIDER
(
data
);
...
...
@@ -235,6 +246,9 @@ static bool_t linphone_ldap_contact_provider_iterate(void *data)
ms_message
(
"iterate: LDAP_RES_BIND"
);
if
(
ldap_msgid
(
results
)
!=
obj
->
bind_msgid
)
{
ms_error
(
"Bad msgid"
);
}
else
{
linphone_ldap_parse_bind_results
(
obj
,
results
);
obj
->
bind_msgid
=
0
;
}
break
;
}
...
...
@@ -320,7 +334,8 @@ static int linphone_ldap_contact_provider_bind( LinphoneLDAPContactProvider* obj
case
ANONYMOUS
:
default:
{
ret
=
ldap_sasl_bind
(
obj
->
ld
,
obj
->
base_object
,
NULL
,
&
password
,
NULL
,
NULL
,
&
bind_msgid
);
char
*
auth
=
NULL
;
ret
=
ldap_sasl_bind
(
obj
->
ld
,
obj
->
base_object
,
auth
,
&
password
,
NULL
,
NULL
,
&
bind_msgid
);
if
(
ret
==
LDAP_SUCCESS
)
{
obj
->
bind_msgid
=
bind_msgid
;
}
else
{
...
...
@@ -360,7 +375,7 @@ LinphoneLDAPContactProvider*linphone_ldap_contact_provider_create(LinphoneCore*
belle_sip_object_unref
(
obj
);
return
NULL
;
}
else
{
// register our hook into iterate so that LDAP can do its magic asynchronously
// register our hook into iterate so that LDAP can do its magic asynchronously
.
linphone_ldap_contact_provider_bind
(
obj
);
linphone_core_add_iterate_hook
(
lc
,
linphone_ldap_contact_provider_iterate
,
obj
);
}
...
...
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