Rev 107: - fix includes to work in both samba4 and ctdb standalone
in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Mon Apr 16 00:21:44 GMT 2007
------------------------------------------------------------
revno: 107
revision-id: tridge at samba.org-20070416002144-34daa28d0f1d01db
parent: tridge at samba.org-20070415232910-a604c82b6945e169
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Mon 2007-04-16 10:21:44 +1000
message:
- fix includes to work in both samba4 and ctdb standalone
- when we do a store_unlock the lock record becomes unlocked, so we
must destroy it (or we leak memory)
modified:
common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
common/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1
common/ctdb_io.c ctdb_io.c-20070409200335-dzfc7f3rra5rcf60-1
common/ctdb_message.c ctdb_message.c-20070208224107-9dnio7x7z33prrmt-1
common/ctdb_util.c ctdb_util.c-20061128065342-to93h6eejj5kon81-3
=== modified file 'common/ctdb_call.c'
--- a/common/ctdb_call.c 2007-04-13 10:38:24 +0000
+++ b/common/ctdb_call.c 2007-04-16 00:21:44 +0000
@@ -796,10 +796,13 @@
ret = ctdb_ltdb_fetch(rec->ctdb_db, rec->key, &header, NULL, NULL);
if (ret) {
ctdb_set_error(rec->ctdb_db->ctdb, "Fetch of locally held record failed");
+ talloc_free(rec);
return ret;
}
ret = ctdb_ltdb_store(rec->ctdb_db, rec->key, &header, data);
+ talloc_free(rec);
+
return ret;
}
=== modified file 'common/ctdb_client.c'
--- a/common/ctdb_client.c 2007-04-14 21:41:35 +0000
+++ b/common/ctdb_client.c 2007-04-16 00:21:44 +0000
@@ -656,6 +656,7 @@
state = ctdb_client_store_unlock_send(rec, rec, data);
res = ctdb_client_store_unlock_recv(state, rec);
+ talloc_free(rec);
+
return res;
-
}
=== modified file 'common/ctdb_io.c'
--- a/common/ctdb_io.c 2007-04-13 10:38:24 +0000
+++ b/common/ctdb_io.c 2007-04-16 00:21:44 +0000
@@ -28,7 +28,7 @@
#include "system/network.h"
#include "system/filesys.h"
#include "../include/ctdb_private.h"
-#include "ctdb.h"
+#include "../include/ctdb.h"
/* structures for packet queueing - see common/ctdb_io.c */
struct ctdb_partial {
=== modified file 'common/ctdb_message.c'
--- a/common/ctdb_message.c 2007-04-13 10:38:24 +0000
+++ b/common/ctdb_message.c 2007-04-16 00:21:44 +0000
@@ -27,7 +27,7 @@
#include "system/network.h"
#include "system/filesys.h"
#include "../include/ctdb_private.h"
-
+#include "lib/util/dlinklist.h"
/*
this dispatches the messages to the registered ctdb message handler
=== modified file 'common/ctdb_util.c'
--- a/common/ctdb_util.c 2006-12-18 05:01:11 +0000
+++ b/common/ctdb_util.c 2007-04-16 00:21:44 +0000
@@ -20,9 +20,10 @@
#include "includes.h"
#include "lib/events/events.h"
+#include "lib/tdb/include/tdb.h"
#include "system/network.h"
#include "system/filesys.h"
-#include "ctdb_private.h"
+#include "../include/ctdb_private.h"
/*
return error string for last error
More information about the samba-cvs
mailing list