git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e8210f
)
libctdb: fix writerecord() to actually write the record.
author
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 21 Jun 2010 05:15:37 +0000
(14:45 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 21 Jun 2010 05:15:37 +0000
(14:45 +0930)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
libctdb/local_tdb.c
patch
|
blob
|
history
diff --git
a/libctdb/local_tdb.c
b/libctdb/local_tdb.c
index 9a19df7c08bd073b57474a0d69b45fe581d8d457..705be2b548fb9a636cde77133414ec9e4689a02b 100644
(file)
--- a/
libctdb/local_tdb.c
+++ b/
libctdb/local_tdb.c
@@
-89,6
+89,8
@@
int ctdb_local_store(struct tdb_context *tdb, TDB_DATA key,
errno = ENOMEM;
return -1;
}
+ memcpy(rec.dptr, header, sizeof(*header));
+ memcpy(rec.dptr + sizeof(*header), data.dptr, data.dsize);
ret = tdb_store(tdb, key, rec, TDB_REPLACE);
free(old.dptr);