git » nmdb » commit 7067979

Rename TIPC constants with TIPC_ prefixes.

author Alberto Bertogli
2007-06-01 06:31:14 UTC
committer Alberto Bertogli
2007-06-01 06:31:14 UTC
parent 596535f23634bf3b217e90373d0e40780cb5b3ab

Rename TIPC constants with TIPC_ prefixes.

This clarifies namespaces for the following patches where TCP options
are introduced.

Completely API and ABI compatible, these were only used internally.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

libnmdb/libnmdb.c +2 -2
libnmdb/net-const.h +3 -3
nmdb/main.c +1 -1
nmdb/net-const.h +3 -3
nmdb/tipc.c +1 -1

diff --git a/libnmdb/libnmdb.c b/libnmdb/libnmdb.c
index 51eaed0..f346492 100644
--- a/libnmdb/libnmdb.c
+++ b/libnmdb/libnmdb.c
@@ -127,12 +127,12 @@ int nmdb_add_tipc_server(nmdb_t *db, int port)
 	newsrv->fd = fd;
 
 	if (port < 0)
-		port = SERVER_INST;
+		port = TIPC_SERVER_INST;
 
 	newsrv->info.tipc.port = port;
 	newsrv->info.tipc.srvsa.family = AF_TIPC;
 	newsrv->info.tipc.srvsa.addrtype = TIPC_ADDR_NAMESEQ;
-	newsrv->info.tipc.srvsa.addr.nameseq.type = SERVER_TYPE;
+	newsrv->info.tipc.srvsa.addr.nameseq.type = TIPC_SERVER_TYPE;
 	newsrv->info.tipc.srvsa.addr.nameseq.lower = port;
 	newsrv->info.tipc.srvsa.addr.nameseq.upper = port;
 	newsrv->info.tipc.srvsa.scope = TIPC_CLUSTER_SCOPE;
diff --git a/libnmdb/net-const.h b/libnmdb/net-const.h
index 127b9b9..e0f5fc2 100644
--- a/libnmdb/net-const.h
+++ b/libnmdb/net-const.h
@@ -7,9 +7,9 @@
  * Isolated so it's shared between the server and the library code.
  */
 
-/* TIPC server type and instance -- Hardcoded for now. */
-#define SERVER_TYPE 26001
-#define SERVER_INST 10
+/* TIPC server type (hardcoded) and default instance. */
+#define TIPC_SERVER_TYPE 26001
+#define TIPC_SERVER_INST 10
 
 /* Protocol version, for checking in the network header. */
 #define PROTO_VER 1
diff --git a/nmdb/main.c b/nmdb/main.c
index 3e5fb36..8b671db 100644
--- a/nmdb/main.c
+++ b/nmdb/main.c
@@ -85,7 +85,7 @@ static int load_settings(int argc, char **argv)
 	}
 
 	if (settings.tipc_lower == -1)
-		settings.tipc_lower = SERVER_INST;
+		settings.tipc_lower = TIPC_SERVER_INST;
 	if (settings.tipc_upper == -1)
 		settings.tipc_upper = settings.tipc_lower;
 	if (settings.numobjs == -1)
diff --git a/nmdb/net-const.h b/nmdb/net-const.h
index 127b9b9..e0f5fc2 100644
--- a/nmdb/net-const.h
+++ b/nmdb/net-const.h
@@ -7,9 +7,9 @@
  * Isolated so it's shared between the server and the library code.
  */
 
-/* TIPC server type and instance -- Hardcoded for now. */
-#define SERVER_TYPE 26001
-#define SERVER_INST 10
+/* TIPC server type (hardcoded) and default instance. */
+#define TIPC_SERVER_TYPE 26001
+#define TIPC_SERVER_INST 10
 
 /* Protocol version, for checking in the network header. */
 #define PROTO_VER 1
diff --git a/nmdb/tipc.c b/nmdb/tipc.c
index c1b0059..a239805 100644
--- a/nmdb/tipc.c
+++ b/nmdb/tipc.c
@@ -165,7 +165,7 @@ int tipc_init(void)
 	else
 		srvsa.addrtype = TIPC_ADDR_NAMESEQ;
 
-	srvsa.addr.nameseq.type = SERVER_TYPE;
+	srvsa.addr.nameseq.type = TIPC_SERVER_TYPE;
 	srvsa.addr.nameseq.lower = settings.tipc_lower;
 	srvsa.addr.nameseq.upper = settings.tipc_upper;
 	srvsa.scope = TIPC_CLUSTER_SCOPE;