git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8a3aa56
)
s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record...
author
Michael Adam
<obnox@samba.org>
Wed, 12 Oct 2011 10:04:50 +0000
(12:04 +0200)
committer
Michael Adam
<obnox@samba.org>
Wed, 12 Oct 2011 20:45:52 +0000
(22:45 +0200)
It did not compare the last charcter (usually '\0')
source3/lib/dbwrap/dbwrap_ctdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap/dbwrap_ctdb.c
b/source3/lib/dbwrap/dbwrap_ctdb.c
index cdb3d73c55788b8e521ab035d6adba9fb5d9676f..4c5cd64da042efaeeabbf96d0d8e66018ede49e9 100644
(file)
--- a/
source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/
source3/lib/dbwrap/dbwrap_ctdb.c
@@
-1361,8
+1361,7
@@
static int traverse_persistent_callback_read(TDB_CONTEXT *tdb, TDB_DATA kbuf, TD
* This is used for persistent transactions internally.
*/
if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 &&
* This is used for persistent transactions internally.
*/
if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 &&
- strncmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY,
- strlen(CTDB_DB_SEQNUM_KEY)) == 0)
+ strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY) == 0)
{
return 0;
}
{
return 0;
}