git » nmdb » commit dacdc2a

Use the TIPC lower and upper settings.

author Alberto Bertogli
2006-09-12 19:27:35 UTC
committer Alberto Bertogli
2006-09-12 19:27:35 UTC
parent 0b70fcfaa1d667618c55205908f72616bafb5e63

Use the TIPC lower and upper settings.

nmdb/common.h +1 -1
nmdb/main.c +4 -4
nmdb/tipc.c +2 -2

diff --git a/nmdb/common.h b/nmdb/common.h
index 2fb1185..6aadc70 100644
--- a/nmdb/common.h
+++ b/nmdb/common.h
@@ -15,7 +15,7 @@ struct queue *op_queue;
 /* Settings */
 struct  {
 	int tipc_lower;
-	int tipc_higher;
+	int tipc_upper;
 	int numobjs;
 	int foreground;
 	char *dbname;
diff --git a/nmdb/main.c b/nmdb/main.c
index 5bb30c5..d0b3688 100644
--- a/nmdb/main.c
+++ b/nmdb/main.c
@@ -36,7 +36,7 @@ static int load_settings(int argc, char **argv)
 	int c;
 
 	settings.tipc_lower = -1;
-	settings.tipc_higher = -1;
+	settings.tipc_upper = -1;
 	settings.numobjs = -1;
 	settings.foreground = 0;
 
@@ -53,7 +53,7 @@ static int load_settings(int argc, char **argv)
 			settings.tipc_lower = atoi(optarg);
 			break;
 		case 'L':
-			settings.tipc_higher = atoi(optarg);
+			settings.tipc_upper = atoi(optarg);
 			break;
 		case 'c':
 			settings.numobjs = atoi(optarg) * 1024;
@@ -73,8 +73,8 @@ static int load_settings(int argc, char **argv)
 
 	if (settings.tipc_lower == -1)
 		settings.tipc_lower = SERVER_INST;
-	if (settings.tipc_higher == -1)
-		settings.tipc_higher = settings.tipc_lower;
+	if (settings.tipc_upper == -1)
+		settings.tipc_upper = settings.tipc_lower;
 	if (settings.numobjs == -1)
 		settings.numobjs = 128 * 1024;
 
diff --git a/nmdb/tipc.c b/nmdb/tipc.c
index 2e38266..0a5c908 100644
--- a/nmdb/tipc.c
+++ b/nmdb/tipc.c
@@ -211,8 +211,8 @@ int tipc_init(void)
 	srvsa.family = AF_TIPC;
 	srvsa.addrtype = TIPC_ADDR_NAMESEQ;
 	srvsa.addr.nameseq.type = SERVER_TYPE;
-	srvsa.addr.nameseq.lower = SERVER_INST;
-	srvsa.addr.nameseq.upper = SERVER_INST;
+	srvsa.addr.nameseq.lower = settings.tipc_lower;
+	srvsa.addr.nameseq.upper = settings.tipc_upper;
 	srvsa.scope = TIPC_CLUSTER_SCOPE;
 
 	fd = socket(AF_TIPC, SOCK_RDM, 0);