summaryrefslogtreecommitdiffstats
path: root/ctdb/tcp
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-04-11 20:12:15 +0200
committerVolker Lendecke <vl@samba.org>2007-04-11 20:12:15 +0200
commitd8dd8fbe49831435f005ee06861d46b1fb61f103 (patch)
tree014387ca092c50d96f399407642b7b93dc75931d /ctdb/tcp
parenta5d1b2ce4844b07d35900344bb4ab5e306879e95 (diff)
downloadsamba-d8dd8fbe49831435f005ee06861d46b1fb61f103.tar.gz
samba-d8dd8fbe49831435f005ee06861d46b1fb61f103.tar.xz
samba-d8dd8fbe49831435f005ee06861d46b1fb61f103.zip
Rename "private" to "private_data"
(This used to be ctdb commit 78cf4443ac0c66fb750ef6919bcdec189ac219c9)
Diffstat (limited to 'ctdb/tcp')
-rw-r--r--ctdb/tcp/tcp_connect.c23
-rw-r--r--ctdb/tcp/tcp_init.c4
-rw-r--r--ctdb/tcp/tcp_io.c2
3 files changed, 16 insertions, 13 deletions
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 27928c071e..a6f562e237 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -40,8 +40,8 @@ static void set_nonblocking(int fd)
void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private)
{
struct ctdb_node *node = talloc_get_type(private, struct ctdb_node);
- struct ctdb_tcp_node *tnode = talloc_get_type(node->private,
- struct ctdb_tcp_node);
+ struct ctdb_tcp_node *tnode = talloc_get_type(
+ node->private_data, struct ctdb_tcp_node);
/* start a new connect cycle to try to re-establish the
link */
@@ -56,10 +56,11 @@ void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private)
called when socket becomes writeable on connect
*/
static void ctdb_node_connect_write(struct event_context *ev, struct fd_event *fde,
- uint16_t flags, void *private)
+ uint16_t flags, void *private_data)
{
- struct ctdb_node *node = talloc_get_type(private, struct ctdb_node);
- struct ctdb_tcp_node *tnode = talloc_get_type(node->private,
+ struct ctdb_node *node = talloc_get_type(private_data,
+ struct ctdb_node);
+ struct ctdb_tcp_node *tnode = talloc_get_type(node->private_data,
struct ctdb_tcp_node);
struct ctdb_context *ctdb = node->ctdb;
int error = 0;
@@ -106,10 +107,11 @@ static int ctdb_tcp_get_address(struct ctdb_context *ctdb,
called when we should try and establish a tcp connection to a node
*/
void ctdb_tcp_node_connect(struct event_context *ev, struct timed_event *te,
- struct timeval t, void *private)
+ struct timeval t, void *private_data)
{
- struct ctdb_node *node = talloc_get_type(private, struct ctdb_node);
- struct ctdb_tcp_node *tnode = talloc_get_type(node->private,
+ struct ctdb_node *node = talloc_get_type(private_data,
+ struct ctdb_node);
+ struct ctdb_tcp_node *tnode = talloc_get_type(node->private_data,
struct ctdb_tcp_node);
struct ctdb_context *ctdb = node->ctdb;
struct sockaddr_in sock_in;
@@ -179,7 +181,7 @@ static void ctdb_listen_event(struct event_context *ev, struct fd_event *fde,
struct ctdb_incoming *in;
ctdb = talloc_get_type(private, struct ctdb_context);
- ctcp = talloc_get_type(ctdb->private, struct ctdb_tcp);
+ ctcp = talloc_get_type(ctdb->private_data, struct ctdb_tcp);
memset(&addr, 0, sizeof(addr));
len = sizeof(addr);
fd = accept(ctcp->listen_fd, (struct sockaddr *)&addr, &len);
@@ -203,7 +205,8 @@ static void ctdb_listen_event(struct event_context *ev, struct fd_event *fde,
*/
int ctdb_tcp_listen(struct ctdb_context *ctdb)
{
- struct ctdb_tcp *ctcp = talloc_get_type(ctdb->private, struct ctdb_tcp);
+ struct ctdb_tcp *ctcp = talloc_get_type(ctdb->private_data,
+ struct ctdb_tcp);
struct sockaddr_in sock;
int one = 1;
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c
index d9725a0e62..20b9bc9e33 100644
--- a/ctdb/tcp/tcp_init.c
+++ b/ctdb/tcp/tcp_init.c
@@ -66,7 +66,7 @@ static int ctdb_tcp_add_node(struct ctdb_node *node)
CTDB_NO_MEMORY(node->ctdb, tnode);
tnode->fd = -1;
- node->private = tnode;
+ node->private_data = tnode;
tnode->queue = ctdb_queue_setup(node->ctdb, node, tnode->fd, CTDB_TCP_ALIGNMENT,
ctdb_tcp_tnode_cb, node);
@@ -105,7 +105,7 @@ int ctdb_tcp_init(struct ctdb_context *ctdb)
CTDB_NO_MEMORY(ctdb, ctcp);
ctcp->listen_fd = -1;
- ctdb->private = ctcp;
+ ctdb->private_data = ctcp;
ctdb->methods = &ctdb_tcp_methods;
return 0;
}
diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c
index 8ec0a1e538..150d726afb 100644
--- a/ctdb/tcp/tcp_io.c
+++ b/ctdb/tcp/tcp_io.c
@@ -73,7 +73,7 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
*/
int ctdb_tcp_queue_pkt(struct ctdb_node *node, uint8_t *data, uint32_t length)
{
- struct ctdb_tcp_node *tnode = talloc_get_type(node->private,
+ struct ctdb_tcp_node *tnode = talloc_get_type(node->private_data,
struct ctdb_tcp_node);
return ctdb_queue_send(tnode->queue, data, length);
}