Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
01e6bc18
Commit
01e6bc18
authored
Mar 06, 2003
by
Kurt Zeilenga
Browse files
Sync with HEAD
parent
58549325
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-ldbm/idl.c
View file @
01e6bc18
...
...
@@ -629,10 +629,11 @@ idl_insert_key(
#else
if
(
!
first
&&
(
unsigned
long
)(
i
+
1
)
<
ID_BLOCK_NIDS
(
idl
)
)
{
#endif
Datum
k3
;
/* read it in */
cont_alloc
(
&
k
2
,
&
key
);
cont_id
(
&
k
2
,
ID_BLOCK_ID
(
idl
,
i
+
1
)
);
if
(
(
tmp2
=
idl_fetch_one
(
be
,
db
,
k
2
))
==
NULL
)
{
cont_alloc
(
&
k
3
,
&
key
);
cont_id
(
&
k
3
,
ID_BLOCK_ID
(
idl
,
i
+
1
)
);
if
(
(
tmp2
=
idl_fetch_one
(
be
,
db
,
k
3
))
==
NULL
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
INDEX
,
ERR
,
"idl_insert_key: idl_fetch_one returned NULL
\n
"
,
0
,
0
,
0
);
...
...
@@ -643,7 +644,7 @@ idl_insert_key(
#endif
/* split the original block */
cont_free
(
&
k
2
);
cont_free
(
&
k
3
);
goto
split
;
}
...
...
@@ -683,7 +684,7 @@ idl_insert_key(
db
->
dbc_maxids
))
)
{
case
1
:
/* id inserted first in block */
rc
=
idl_change_first
(
be
,
db
,
key
,
idl
,
i
+
1
,
k
2
,
tmp2
);
i
+
1
,
k
3
,
tmp2
);
/* FALL */
case
2
:
/* id already there - how? */
...
...
@@ -707,6 +708,8 @@ idl_insert_key(
idl_free
(
tmp
);
idl_free
(
tmp2
);
cont_free
(
&
k3
);
cont_free
(
&
k2
);
idl_free
(
idl
);
return
(
0
);
...
...
@@ -715,6 +718,7 @@ idl_insert_key(
}
idl_free
(
tmp2
);
cont_free
(
&
k3
);
}
split:
...
...
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