diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-10-21 11:53:29 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-10-28 05:42:05 +0100 |
commit | a54db687acc14351613738d93a4e99ceaa2c6759 (patch) | |
tree | 3e81dc50bfb6065bde1628158c6ec5e2fb40c1b6 /ctdb | |
parent | 69c0c43d55c93b82b2e398d5c61009fd347170bf (diff) | |
download | samba-a54db687acc14351613738d93a4e99ceaa2c6759.tar.gz samba-a54db687acc14351613738d93a4e99ceaa2c6759.tar.xz samba-a54db687acc14351613738d93a4e99ceaa2c6759.zip |
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.c | 4 | ||||
-rw-r--r-- | ctdb/include/ctdb_protocol.h | 2 | ||||
-rw-r--r-- | ctdb/server/ctdb_daemon.c | 6 | ||||
-rw-r--r-- | ctdb/tcp/tcp_io.c | 2 | ||||
-rw-r--r-- | ctdb/tools/ctdb.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 424937ad8c..07b17d016a 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 72161affa6..725e426230 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 254b1ca819..aac507cab5 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 5111195b17..a951320a07 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 458ea9e4ab..5d5ce3cc9e 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)); |