Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
a95890e9
Commit
a95890e9
authored
Jul 29, 2020
by
Howard Chu
Committed by
Quanah Gibson-Mount
Jul 29, 2020
Browse files
ITS
#9295
use replace on single-valued attrs
For delta-sync as well as regular sync
parent
98937068
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/syncrepl.c
View file @
a95890e9
...
...
@@ -1882,6 +1882,8 @@ syncrepl_accesslog_mods(
if
(
!
mod
||
ad
!=
mod
->
sml_desc
||
op
!=
mod
->
sml_op
)
{
mod
=
(
Modifications
*
)
ch_malloc
(
sizeof
(
Modifications
)
);
if
(
op
==
LDAP_MOD_ADD
&&
is_at_single_value
(
ad
->
ad_type
))
op
=
LDAP_MOD_REPLACE
;
mod
->
sml_flags
=
0
;
mod
->
sml_op
=
op
;
mod
->
sml_next
=
NULL
;
...
...
@@ -4242,7 +4244,10 @@ attr_cmp( Operation *op, Attribute *old, Attribute *new,
/* some values were added */
if
(
nn
&&
no
<
o
)
{
mod
=
ch_malloc
(
sizeof
(
Modifications
)
);
mod
->
sml_op
=
LDAP_MOD_ADD
;
if
(
is_at_single_value
(
old
->
a_desc
->
ad_type
))
mod
->
sml_op
=
LDAP_MOD_REPLACE
;
else
mod
->
sml_op
=
LDAP_MOD_ADD
;
mod
->
sml_flags
=
0
;
mod
->
sml_desc
=
old
->
a_desc
;
mod
->
sml_type
=
mod
->
sml_desc
->
ad_cname
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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