diff options
| author | Andrew Tridgell <tridge@samba.org> | 2007-04-18 11:20:24 +1000 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2007-04-18 11:20:24 +1000 |
| commit | 8f059f4d91ee8df59eb9ae4052ca8f5afa392c3b (patch) | |
| tree | 1e5fb4fb9689f14cccc648656c5cb90ce76d84c5 /ctdb/include | |
| parent | 98bb60e9d6fd68a5614f15517bd591e433956fe7 (diff) | |
| parent | 27837c197aaf221019d3d0d25896653b5f87659f (diff) | |
- merge volkers debug changes
- fixed memory leaks in the 3 packet receive routines. The problem was
that the ctdb_call logic would occasionally complete and free a
incoming packet, which would then be freed again in the packet
receive routine. The solution is to make the packet a child of a
temporary context in the receive routine then free that temporary
context. That allows other routines to keep or free the packet if
they want to, while allowing us to safely free it (via a free of the
temporary context) in the receive function
(This used to be ctdb commit 304aaaa7235febbe97ff9ecb43875b7265ac48cd)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb_private.h | 2 | ||||
| -rw-r--r-- | ctdb/include/includes.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index be0fbf85ae..6736ee4ab7 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -195,7 +195,7 @@ struct ctdb_call_state { /* used for fetch_lock */ -struct ctdb_record_handle { +struct ctdb_fetch_handle { struct ctdb_db_context *ctdb_db; TDB_DATA key; TDB_DATA *data; diff --git a/ctdb/include/includes.h b/ctdb/include/includes.h index 5d3207820c..bffc66b358 100644 --- a/ctdb/include/includes.h +++ b/ctdb/include/includes.h @@ -6,6 +6,7 @@ #include "idtree.h" #include "ctdb.h" #include "lib/util/dlinklist.h" +#include "lib/util/debug.h" typedef bool BOOL; @@ -14,7 +15,7 @@ typedef bool BOOL; extern int LogLevel; -#define DEBUG(lvl, x) if ((lvl) <= LogLevel) (printf x) +#define DEBUG(lvl, x) if ((lvl) <= LogLevel) (do_debug x) #define _PUBLIC_ |
