git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
773f54d
)
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>
Thu, 13 Oct 2011 15:24:36 +0000
(17:24 +0200)
It did not compare the last charcter (usually '\0')
source3/lib/dbwrap_ctdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap_ctdb.c
b/source3/lib/dbwrap_ctdb.c
index 2cb776a8215b0593f153b0fc59b9d6e72e1eff20..7497de4ed0382cfc96129be448c19a01af213557 100644
(file)
--- a/
source3/lib/dbwrap_ctdb.c
+++ b/
source3/lib/dbwrap_ctdb.c
@@
-1339,8
+1339,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 &&
- 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;
}