diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-04-19 10:37:44 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-04-19 10:37:44 +1000 |
commit | b79e29c779b4e1dc3247b3bb2c1d298e08bc8cdc (patch) | |
tree | e22008931e996ef962b48758b6ff9318a85e6872 /ctdb/tcp/tcp_init.c | |
parent | fde5a66531af99c6d6ef665ccbfbb4944bdefdd3 (diff) | |
download | samba-b79e29c779b4e1dc3247b3bb2c1d298e08bc8cdc.tar.gz samba-b79e29c779b4e1dc3247b3bb2c1d298e08bc8cdc.tar.xz samba-b79e29c779b4e1dc3247b3bb2c1d298e08bc8cdc.zip |
- make he packet allocation routines take a mem_ctx, which allows
us to put memory directly in the right context, avoiding quite a few
talloc_steal calls, and simplifying the code
- make the fetch lock code in the daemon fully async
(This used to be ctdb commit d98b4b4fcadad614861c0d44a3854d97b01d0f74)
Diffstat (limited to 'ctdb/tcp/tcp_init.c')
-rw-r--r-- | ctdb/tcp/tcp_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index 20b9bc9e33..7b5a7b1f43 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -78,13 +78,13 @@ static int ctdb_tcp_add_node(struct ctdb_node *node) /* transport packet allocator - allows transport to control memory for packets */ -static void *ctdb_tcp_allocate_pkt(struct ctdb_context *ctdb, size_t size) +static void *ctdb_tcp_allocate_pkt(TALLOC_CTX *mem_ctx, size_t size) { /* tcp transport needs to round to 8 byte alignment to ensure that we can use a length header and 64 bit elements in structures */ size = (size+(CTDB_TCP_ALIGNMENT-1)) & ~(CTDB_TCP_ALIGNMENT-1); - return talloc_size(ctdb, size); + return talloc_size(mem_ctx, size); } |