Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
59de0a47
Commit
59de0a47
authored
Feb 12, 2008
by
Quanah Gibson-Mount
Browse files
Cleanup bdb_next_id unused arg
parent
a149192d
Changes
4
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/add.c
View file @
59de0a47
...
...
@@ -33,6 +33,7 @@ bdb_add(Operation *op, SlapReply *rs )
AttributeDescription
*
children
=
slap_schema
.
si_ad_children
;
AttributeDescription
*
entry
=
slap_schema
.
si_ad_entry
;
DB_TXN
*
ltid
=
NULL
,
*
lt2
;
ID
eid
=
NOID
;
struct
bdb_op_info
opinfo
=
{
0
};
int
subentry
;
BDB_LOCKER
locker
=
0
,
rlocker
=
0
;
...
...
@@ -115,20 +116,6 @@ txnReturn:
subentry
=
is_entry_subentry
(
op
->
oq_add
.
rs_e
);
/*
* acquire an ID outside of the operation transaction
* to avoid serializing adds.
*/
rs
->
sr_err
=
bdb_next_id
(
op
->
o_bd
,
NULL
,
&
op
->
oq_add
.
rs_e
->
e_id
);
if
(
rs
->
sr_err
!=
0
)
{
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": next_id failed (%d)
\n
"
,
rs
->
sr_err
,
0
,
0
);
rs
->
sr_err
=
LDAP_OTHER
;
rs
->
sr_text
=
"internal error"
;
goto
return_results
;
}
/* Get our thread locker ID */
rs
->
sr_err
=
LOCK_ID
(
bdb
->
bi_dbenv
,
&
rlocker
);
...
...
@@ -315,6 +302,19 @@ retry: /* transaction retry */
goto
return_results
;;
}
if
(
eid
==
NOID
)
{
rs
->
sr_err
=
bdb_next_id
(
op
->
o_bd
,
&
eid
);
if
(
rs
->
sr_err
!=
0
)
{
Debug
(
LDAP_DEBUG_TRACE
,
LDAP_XSTRING
(
bdb_add
)
": next_id failed (%d)
\n
"
,
rs
->
sr_err
,
0
,
0
);
rs
->
sr_err
=
LDAP_OTHER
;
rs
->
sr_text
=
"internal error"
;
goto
return_results
;
}
op
->
oq_add
.
rs_e
->
e_id
=
eid
;
}
/* nested transaction */
rs
->
sr_err
=
TXN_BEGIN
(
bdb
->
bi_dbenv
,
ltid
,
&
lt2
,
bdb
->
bi_db_opflags
);
...
...
servers/slapd/back-bdb/nextid.c
View file @
59de0a47
...
...
@@ -21,7 +21,7 @@
#include
"back-bdb.h"
int
bdb_next_id
(
BackendDB
*
be
,
DB_TXN
*
tid
,
ID
*
out
)
int
bdb_next_id
(
BackendDB
*
be
,
ID
*
out
)
{
struct
bdb_info
*
bdb
=
(
struct
bdb_info
*
)
be
->
be_private
;
...
...
servers/slapd/back-bdb/proto-bdb.h
View file @
59de0a47
...
...
@@ -419,7 +419,7 @@ bdb_key_change(
#define bdb_next_id BDB_SYMBOL(next_id)
#define bdb_last_id BDB_SYMBOL(last_id)
int
bdb_next_id
(
BackendDB
*
be
,
DB_TXN
*
tid
,
ID
*
id
);
int
bdb_next_id
(
BackendDB
*
be
,
ID
*
id
);
int
bdb_last_id
(
BackendDB
*
be
,
DB_TXN
*
tid
);
/*
...
...
servers/slapd/back-bdb/tools.c
View file @
59de0a47
...
...
@@ -364,7 +364,7 @@ static int bdb_tool_next_id(
ei
=
&
eidummy
;
}
}
rc
=
bdb_next_id
(
op
->
o_bd
,
tid
,
&
e
->
e_id
);
rc
=
bdb_next_id
(
op
->
o_bd
,
&
e
->
e_id
);
if
(
rc
)
{
snprintf
(
text
->
bv_val
,
text
->
bv_len
,
"next_id failed: %s (%d)"
,
...
...
Write
Preview
Supports
Markdown
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