summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-10-29 16:36:30 +1100
committerMartin Schwenke <martins@samba.org>2015-11-04 00:47:14 +0100
commitacf858defbe8672c91265e6e2afe45476ef0fba6 (patch)
tree0324550a84d290b0f6260b1c45b49ec29566b9da
parent296d9f4cdafdf5770c64f9f75effd250b1f9972e (diff)
downloadsamba-acf858defbe8672c91265e6e2afe45476ef0fba6.tar.gz
ctdb-daemon: Rename struct ctdb_req_message to ctdb_req_message_old
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
-rw-r--r--ctdb/client/ctdb_client.c8
-rw-r--r--ctdb/common/ctdb_io.c2
-rw-r--r--ctdb/include/ctdb_protocol.h2
-rw-r--r--ctdb/server/ctdb_daemon.c16
-rw-r--r--source3/include/ctdbd_conn.h2
-rw-r--r--source3/lib/ctdbd_conn.c22
6 files changed, 26 insertions, 26 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 842d4ef75f8..e1e62c7c9f1 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -195,7 +195,7 @@ static void ctdb_client_reply_call(struct ctdb_context *ctdb, struct ctdb_req_he
void ctdb_request_message(struct ctdb_context *ctdb,
struct ctdb_req_header *hdr)
{
- struct ctdb_req_message *c = (struct ctdb_req_message *)hdr;
+ struct ctdb_req_message_old *c = (struct ctdb_req_message_old *)hdr;
TDB_DATA data;
data.dsize = c->datalen;
@@ -589,12 +589,12 @@ int ctdb_client_check_message_handlers(struct ctdb_context *ctdb, uint64_t *ids,
int ctdb_client_send_message(struct ctdb_context *ctdb, uint32_t pnn,
uint64_t srvid, TDB_DATA data)
{
- struct ctdb_req_message *r;
+ struct ctdb_req_message_old *r;
int len, res;
- len = offsetof(struct ctdb_req_message, data) + data.dsize;
+ len = offsetof(struct ctdb_req_message_old, data) + data.dsize;
r = ctdbd_allocate_pkt(ctdb, ctdb, CTDB_REQ_MESSAGE,
- len, struct ctdb_req_message);
+ len, struct ctdb_req_message_old);
CTDB_NO_MEMORY(ctdb, r);
r->hdr.destnode = pnn;
diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c
index fca9be05021..8b649a2d43a 100644
--- a/ctdb/common/ctdb_io.c
+++ b/ctdb/common/ctdb_io.c
@@ -365,7 +365,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length)
break;
}
case CTDB_REQ_MESSAGE: {
- struct ctdb_req_message *m = (struct ctdb_req_message *)hdr;
+ struct ctdb_req_message_old *m = (struct ctdb_req_message_old *)hdr;
talloc_set_name(pkt, "ctdb_queue_pkt: %s message srvid=%llu datalen=%u",
queue->name, (unsigned long long)m->srvid, (unsigned)m->datalen);
break;
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index f4d07d004e6..11d9f53d67a 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -473,7 +473,7 @@ struct ctdb_reply_dmaster_old {
uint8_t data[1];
};
-struct ctdb_req_message {
+struct ctdb_req_message_old {
struct ctdb_req_header hdr;
uint64_t srvid;
uint32_t datalen;
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 81bb98d4d67..f885a81f758 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -145,13 +145,13 @@ static void daemon_message_handler(uint64_t srvid, TDB_DATA data,
void *private_data)
{
struct ctdb_client *client = talloc_get_type(private_data, struct ctdb_client);
- struct ctdb_req_message *r;
+ struct ctdb_req_message_old *r;
int len;
/* construct a message to send to the client containing the data */
- len = offsetof(struct ctdb_req_message, data) + data.dsize;
+ len = offsetof(struct ctdb_req_message_old, data) + data.dsize;
r = ctdbd_allocate_pkt(client->ctdb, client->ctdb, CTDB_REQ_MESSAGE,
- len, struct ctdb_req_message);
+ len, struct ctdb_req_message_old);
CTDB_NO_MEMORY_VOID(client->ctdb, r);
talloc_set_name_const(r, "req_message packet");
@@ -273,7 +273,7 @@ static int ctdb_client_destructor(struct ctdb_client *client)
from a local client over the unix domain socket
*/
static void daemon_request_message_from_client(struct ctdb_client *client,
- struct ctdb_req_message *c)
+ struct ctdb_req_message_old *c)
{
TDB_DATA data;
int res;
@@ -845,7 +845,7 @@ static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
case CTDB_REQ_MESSAGE:
CTDB_INCREMENT_STAT(ctdb, client.req_message);
- daemon_request_message_from_client(client, (struct ctdb_req_message *)hdr);
+ daemon_request_message_from_client(client, (struct ctdb_req_message_old *)hdr);
break;
case CTDB_REQ_CONTROL:
@@ -1616,7 +1616,7 @@ static int ctdb_local_message(struct ctdb_context *ctdb, uint64_t srvid, TDB_DAT
int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t pnn,
uint64_t srvid, TDB_DATA data)
{
- struct ctdb_req_message *r;
+ struct ctdb_req_message_old *r;
int len;
if (ctdb->methods == NULL) {
@@ -1629,9 +1629,9 @@ int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t pnn,
return ctdb_local_message(ctdb, srvid, data);
}
- len = offsetof(struct ctdb_req_message, data) + data.dsize;
+ len = offsetof(struct ctdb_req_message_old, data) + data.dsize;
r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REQ_MESSAGE, len,
- struct ctdb_req_message);
+ struct ctdb_req_message_old);
CTDB_NO_MEMORY(ctdb, r);
r->hdr.destnode = pnn;
diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h
index 9342ddcaa93..27993c744f0 100644
--- a/source3/include/ctdbd_conn.h
+++ b/source3/include/ctdbd_conn.h
@@ -84,7 +84,7 @@ int ctdbd_control_local(struct ctdbd_connection *conn, uint32_t opcode,
int ctdb_watch_us(struct ctdbd_connection *conn);
int ctdb_unwatch(struct ctdbd_connection *conn);
-struct ctdb_req_message;
+struct ctdb_req_message_old;
int register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid,
int (*cb)(uint32_t src_vnn, uint32_t dst_vnn,
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 4ed1105d253..836d97170fc 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -135,18 +135,18 @@ int register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid,
}
static int ctdbd_msg_call_back(struct ctdbd_connection *conn,
- struct ctdb_req_message *msg)
+ struct ctdb_req_message_old *msg)
{
size_t msg_len;
size_t i, num_callbacks;
msg_len = msg->hdr.length;
- if (msg_len < offsetof(struct ctdb_req_message, data)) {
+ if (msg_len < offsetof(struct ctdb_req_message_old, data)) {
DEBUG(10, ("%s: len %u too small\n", __func__,
(unsigned)msg_len));
return 0;
}
- msg_len -= offsetof(struct ctdb_req_message, data);
+ msg_len -= offsetof(struct ctdb_req_message_old, data);
if (msg_len < msg->datalen) {
DEBUG(10, ("%s: msg_len=%u < msg->datalen=%u\n", __func__,
@@ -370,7 +370,7 @@ static int ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
ctdb_packet_dump(hdr);
if (hdr->operation == CTDB_REQ_MESSAGE) {
- struct ctdb_req_message *msg = (struct ctdb_req_message *)hdr;
+ struct ctdb_req_message_old *msg = (struct ctdb_req_message_old *)hdr;
if (conn->msg_ctx == NULL) {
DEBUG(1, ("Got a message without having a msg ctx, "
@@ -526,7 +526,7 @@ int ctdbd_conn_get_fd(struct ctdbd_connection *conn)
static int ctdb_handle_message(struct ctdbd_connection *conn,
struct ctdb_req_header *hdr)
{
- struct ctdb_req_message *msg;
+ struct ctdb_req_message_old *msg;
if (hdr->operation != CTDB_REQ_MESSAGE) {
DEBUG(0, ("Received async msg of type %u, discarding\n",
@@ -534,7 +534,7 @@ static int ctdb_handle_message(struct ctdbd_connection *conn,
return EINVAL;
}
- msg = (struct ctdb_req_message *)hdr;
+ msg = (struct ctdb_req_message_old *)hdr;
ctdbd_msg_call_back(conn, msg);
@@ -598,12 +598,12 @@ int ctdbd_messaging_send_iov(struct ctdbd_connection *conn,
uint32_t dst_vnn, uint64_t dst_srvid,
const struct iovec *iov, int iovlen)
{
- struct ctdb_req_message r;
+ struct ctdb_req_message_old r;
struct iovec iov2[iovlen+1];
size_t buflen = iov_buflen(iov, iovlen);
ssize_t nwritten;
- r.hdr.length = offsetof(struct ctdb_req_message, data) + buflen;
+ r.hdr.length = offsetof(struct ctdb_req_message_old, data) + buflen;
r.hdr.ctdb_magic = CTDB_MAGIC;
r.hdr.ctdb_version = CTDB_PROTOCOL;
r.hdr.generation = 1;
@@ -618,7 +618,7 @@ int ctdbd_messaging_send_iov(struct ctdbd_connection *conn,
ctdb_packet_dump(&r.hdr);
iov2[0].iov_base = &r;
- iov2[0].iov_len = offsetof(struct ctdb_req_message, data);
+ iov2[0].iov_len = offsetof(struct ctdb_req_message_old, data);
memcpy(&iov2[1], iov, iovlen * sizeof(struct iovec));
nwritten = write_data_iov(conn->fd, iov2, iovlen+1);
@@ -1093,7 +1093,7 @@ int ctdbd_traverse(struct ctdbd_connection *master, uint32_t db_id,
while (True) {
struct ctdb_req_header *hdr = NULL;
- struct ctdb_req_message *m;
+ struct ctdb_req_message_old *m;
struct ctdb_rec_data *d;
ret = ctdb_read_packet(conn->fd, conn->timeout, conn, &hdr);
@@ -1110,7 +1110,7 @@ int ctdbd_traverse(struct ctdbd_connection *master, uint32_t db_id,
return EIO;
}
- m = (struct ctdb_req_message *)hdr;
+ m = (struct ctdb_req_message_old *)hdr;
d = (struct ctdb_rec_data *)&m->data[0];
if (m->datalen < sizeof(uint32_t) || m->datalen != d->length) {
DEBUG(0, ("Got invalid traverse data of length %d\n",