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
424b85d7
Commit
424b85d7
authored
Dec 11, 2007
by
Howard Chu
Browse files
Compatibility with 2.4
parent
741a6e11
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/modify.c
View file @
424b85d7
...
...
@@ -826,6 +826,7 @@ void slap_mods_opattrs(
timestamp
.
bv_val
=
timebuf
;
for
(
modtail
=
modsp
;
*
modtail
;
modtail
=
&
(
*
modtail
)
->
sml_next
)
{
if
(
(
*
modtail
)
->
sml_op
!=
LDAP_MOD_ADD
&&
(
*
modtail
)
->
sml_op
!=
SLAP_MOD_SOFTADD
&&
(
*
modtail
)
->
sml_op
!=
LDAP_MOD_REPLACE
)
continue
;
if
(
(
*
modtail
)
->
sml_desc
==
slap_schema
.
si_ad_entryCSN
)
{
csn
=
(
*
modtail
)
->
sml_values
[
0
];
...
...
@@ -851,11 +852,10 @@ void slap_mods_opattrs(
csn
=
op
->
o_csn
;
}
ptr
=
ber_bvchr
(
&
csn
,
'#'
);
if
(
ptr
&&
ptr
<
&
csn
.
bv_val
[
csn
.
bv_len
]
)
{
timestamp
.
bv_len
=
ptr
-
csn
.
bv_val
;
if
(
timestamp
.
bv_len
>=
sizeof
(
timebuf
))
timestamp
.
bv_len
=
sizeof
(
timebuf
)
-
1
;
strncpy
(
timebuf
,
csn
.
bv_val
,
timestamp
.
bv_len
);
if
(
ptr
)
{
timestamp
.
bv_len
=
STRLENOF
(
"YYYYMMDDHHMMSSZ"
);
AC_MEMCPY
(
timebuf
,
csn
.
bv_val
,
timestamp
.
bv_len
);
timebuf
[
timestamp
.
bv_len
-
1
]
=
'Z'
;
timebuf
[
timestamp
.
bv_len
]
=
'\0'
;
}
else
{
time_t
now
=
slap_get_time
();
...
...
servers/slapd/syncrepl.c
View file @
424b85d7
...
...
@@ -2370,7 +2370,7 @@ syncrepl_updateCookie(
Modifications
mod
=
{
{
0
}
};
struct
berval
vals
[
2
];
int
rc
;
int
rc
,
dbflags
;
slap_callback
cb
=
{
NULL
};
SlapReply
rs_modify
=
{
REP_RESULT
};
...
...
@@ -2402,7 +2402,10 @@ syncrepl_updateCookie(
/* update contextCSN */
op
->
o_msgid
=
SLAP_SYNC_UPDATE_MSGID
;
op
->
orm_modlist
=
&
mod
;
dbflags
=
SLAP_DBFLAGS
(
op
->
o_bd
);
SLAP_DBFLAGS
(
op
->
o_bd
)
|=
SLAP_DBFLAG_NOLASTMOD
;
rc
=
be
->
be_modify
(
op
,
&
rs_modify
);
SLAP_DBFLAGS
(
op
->
o_bd
)
=
dbflags
;
op
->
o_msgid
=
0
;
if
(
rs_modify
.
sr_err
!=
LDAP_SUCCESS
)
{
...
...
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