Commit 512a5182 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wldap32: Move support for modify functions to the Unix library.

parent b2ac9f4b
......@@ -52,7 +52,7 @@ C_ASSERT( sizeof(LDAPSortKeyU) == sizeof(LDAPSortKey) );
C_ASSERT( sizeof(LDAPVLVInfoU) == sizeof(LDAPVLVInfo) );
C_ASSERT( sizeof(struct timevalU) == sizeof(struct timeval) );
static LDAPMod *nullattrs[] = { NULL };
static LDAPMod *nullmods[] = { NULL };
static const struct ldap_callbacks *callbacks;
......@@ -305,14 +305,14 @@ int CDECL wrap_ldap_add_ext( void *ld, const char *dn, LDAPModU **attrs, LDAPCon
LDAPControlU **clientctrls, ULONG *msg )
{
int dummy;
return ldap_add_ext( ld, dn ? dn : "", attrs ? (LDAPMod **)attrs : nullattrs, (LDAPControl **)serverctrls,
return ldap_add_ext( ld, dn ? dn : "", attrs ? (LDAPMod **)attrs : nullmods, (LDAPControl **)serverctrls,
(LDAPControl **)clientctrls, msg ? (int *)msg : &dummy );
}
int CDECL wrap_ldap_add_ext_s( void *ld, const char *dn, LDAPModU **attrs, LDAPControlU **serverctrls,
LDAPControlU **clientctrls )
{
return ldap_add_ext_s( ld, dn ? dn : "", attrs ? (LDAPMod **)attrs : nullattrs, (LDAPControl **)serverctrls,
return ldap_add_ext_s( ld, dn ? dn : "", attrs ? (LDAPMod **)attrs : nullmods, (LDAPControl **)serverctrls,
(LDAPControl **)clientctrls );
}
......@@ -429,6 +429,21 @@ void CDECL wrap_ldap_memvfree( void **ptr )
ldap_memvfree( ptr );
}
int CDECL wrap_ldap_modify_ext( void *ld, const char *dn, LDAPModU **mods, LDAPControlU **serverctrls,
LDAPControlU **clientctrls, ULONG *msg )
{
int dummy;
return ldap_modify_ext( ld, dn ? dn : "", mods ? (LDAPMod **)mods : nullmods, (LDAPControl **)serverctrls,
(LDAPControl **)clientctrls, msg ? (int *)msg : &dummy );
}
int CDECL wrap_ldap_modify_ext_s( void *ld, const char *dn, LDAPModU **mods, LDAPControlU **serverctrls,
LDAPControlU **clientctrls )
{
return ldap_modify_ext_s( ld, dn ? dn : "", mods ? (LDAPMod **)mods : nullmods, (LDAPControl **)serverctrls,
(LDAPControl **)clientctrls );
}
int CDECL wrap_ldap_msgfree( void *msg )
{
return ldap_msgfree( msg );
......@@ -569,6 +584,8 @@ static const struct ldap_funcs funcs =
wrap_ldap_first_reference,
wrap_ldap_memfree,
wrap_ldap_memvfree,
wrap_ldap_modify_ext,
wrap_ldap_modify_ext_s,
wrap_ldap_msgfree,
wrap_ldap_next_attribute,
wrap_ldap_next_entry,
......
......@@ -125,6 +125,10 @@ extern void * CDECL wrap_ldap_first_entry(void *, void *) DECLSPEC_HIDDEN;
extern void * CDECL wrap_ldap_first_reference(void *, void *) DECLSPEC_HIDDEN;
extern void CDECL wrap_ldap_memfree(void *) DECLSPEC_HIDDEN;
extern void CDECL wrap_ldap_memvfree(void **) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_modify_ext(void *, const char *, LDAPModU **, LDAPControlU **, LDAPControlU **,
ULONG *) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_modify_ext_s(void *, const char *, LDAPModU **, LDAPControlU **,
LDAPControlU **) DECLSPEC_HIDDEN;
extern int CDECL wrap_ldap_msgfree(void *) DECLSPEC_HIDDEN;
extern char * CDECL wrap_ldap_next_attribute(void *, void *, void *) DECLSPEC_HIDDEN;
extern void * CDECL wrap_ldap_next_entry(void *, void *) DECLSPEC_HIDDEN;
......@@ -190,6 +194,8 @@ struct ldap_funcs
void * (CDECL *ldap_first_reference)(void *, void *);
void (CDECL *ldap_memfree)(void *);
void (CDECL *ldap_memvfree)(void **);
int (CDECL *ldap_modify_ext)(void *, const char *, LDAPModU **, LDAPControlU **, LDAPControlU **, ULONG *);
int (CDECL *ldap_modify_ext_s)(void *, const char *, LDAPModU **, LDAPControlU **, LDAPControlU **);
int (CDECL *ldap_msgfree)(void *);
char * (CDECL *ldap_next_attribute)(void *, void *, void *);
void * (CDECL *ldap_next_entry)(void *, void *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment