summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-10-21 11:53:29 +1100
committerAmitay Isaacs <amitay@samba.org>2014-10-28 05:42:05 +0100
commita54db687acc14351613738d93a4e99ceaa2c6759 (patch)
tree3e81dc50bfb6065bde1628158c6ec5e2fb40c1b6 /ctdb
parent69c0c43d55c93b82b2e398d5c61009fd347170bf (diff)
downloadsamba-a54db687acc14351613738d93a4e99ceaa2c6759.tar.gz
ctdb: Rename CTDB_VERSION to CTDB_PROTOCOL
CTDB_VERSION really is the ctdb protocol version. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/client/ctdb_client.c4
-rw-r--r--ctdb/include/ctdb_protocol.h2
-rw-r--r--ctdb/server/ctdb_daemon.c6
-rw-r--r--ctdb/tcp/tcp_io.c2
-rw-r--r--ctdb/tools/ctdb.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 424937ad8ca..07b17d016a4 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -54,7 +54,7 @@ struct ctdb_req_header *_ctdbd_allocate_pkt(struct ctdb_context *ctdb,
hdr->length = length;
hdr->operation = operation;
hdr->ctdb_magic = CTDB_MAGIC;
- hdr->ctdb_version = CTDB_VERSION;
+ hdr->ctdb_version = CTDB_PROTOCOL;
hdr->srcnode = ctdb->pnn;
if (ctdb->vnn_map) {
hdr->generation = ctdb->vnn_map->generation;
@@ -216,7 +216,7 @@ void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args)
goto done;
}
- if (hdr->ctdb_version != CTDB_VERSION) {
+ if (hdr->ctdb_version != CTDB_PROTOCOL) {
ctdb_set_error(ctdb, "Bad CTDB version 0x%x rejected in client\n", hdr->ctdb_version);
goto done;
}
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index 72161affa6e..725e4262300 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -272,7 +272,7 @@ enum ctdb_operation {
};
#define CTDB_MAGIC 0x43544442 /* CTDB */
-#define CTDB_VERSION 1
+#define CTDB_PROTOCOL 1
enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_STATISTICS = 1,
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 254b1ca8195..aac507cab5c 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -814,7 +814,7 @@ static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
goto done;
}
- if (hdr->ctdb_version != CTDB_VERSION) {
+ if (hdr->ctdb_version != CTDB_PROTOCOL) {
ctdb_set_error(client->ctdb, "Bad CTDB version 0x%x rejected in daemon\n", hdr->ctdb_version);
goto done;
}
@@ -876,7 +876,7 @@ static void ctdb_daemon_read_cb(uint8_t *data, size_t cnt, void *args)
return;
}
- if (hdr->ctdb_version != CTDB_VERSION) {
+ if (hdr->ctdb_version != CTDB_PROTOCOL) {
ctdb_set_error(client->ctdb, "Bad CTDB version 0x%x rejected in daemon\n", hdr->ctdb_version);
return;
}
@@ -1354,7 +1354,7 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
hdr->length = length;
hdr->operation = operation;
hdr->ctdb_magic = CTDB_MAGIC;
- hdr->ctdb_version = CTDB_VERSION;
+ hdr->ctdb_version = CTDB_PROTOCOL;
hdr->generation = ctdb->vnn_map->generation;
hdr->srcnode = ctdb->pnn;
diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c
index 5111195b178..a951320a07d 100644
--- a/ctdb/tcp/tcp_io.c
+++ b/ctdb/tcp/tcp_io.c
@@ -63,7 +63,7 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
goto failed;
}
- if (hdr->ctdb_version != CTDB_VERSION) {
+ if (hdr->ctdb_version != CTDB_PROTOCOL) {
DEBUG(DEBUG_ALERT, (__location__ " Bad CTDB version 0x%x rejected\n",
hdr->ctdb_version));
goto failed;
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 458ea9e4abe..5d5ce3cc9ea 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -484,7 +484,7 @@ static void show_statistics(struct ctdb_statistics *s, int show_header)
printf("max_childwrite_latency:");
printf("\n");
}
- printf("%d:", CTDB_VERSION);
+ printf("%d:", CTDB_PROTOCOL);
printf("%d:", (int)s->statistics_current_time.tv_sec);
printf("%d:", (int)s->statistics_start_time.tv_sec);
for (i=0;i<ARRAY_SIZE(fields);i++) {
@@ -511,7 +511,7 @@ static void show_statistics(struct ctdb_statistics *s, int show_header)
printf("%.6f:", s->childwrite_latency.max);
printf("\n");
} else {
- printf("CTDB version %u\n", CTDB_VERSION);
+ printf("CTDB version %u\n", CTDB_PROTOCOL);
printf("Current time of statistics : %s", ctime(&s->statistics_current_time.tv_sec));
printf("Statistics collected since : (%03d %02d:%02d:%02d) %s", days, hours, minutes, seconds, ctime(&s->statistics_start_time.tv_sec));