git » nmdb » commit 67f42aa

Fix the API change in the test programs.

author Alberto Bertogli
2007-06-01 04:44:05 UTC
committer Alberto Bertogli
2007-06-01 04:44:05 UTC
parent 1a050bc7c0587e387296b3b35d478e921e42d250

Fix the API change in the test programs.

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

libnmdb/test1c.c +2 -1
libnmdb/test1d.c +2 -1
libnmdb/test2c.c +2 -1
libnmdb/test2cm.c +5 -5
libnmdb/test2d.c +2 -1
libnmdb/test2dm.c +5 -5

diff --git a/libnmdb/test1c.c b/libnmdb/test1c.c
index f4ea111..d7fc06f 100644
--- a/libnmdb/test1c.c
+++ b/libnmdb/test1c.c
@@ -28,11 +28,12 @@ int main(int argc, char **argv)
 	val = (unsigned char *) argv[3];
 	vsize = strlen((char *) val);
 
-	db = nmdb_init(-1);
+	db = nmdb_init();
 	if (db == NULL) {
 		perror("nmdb_init() failed");
 		return 1;
 	}
+	nmdb_add_tipc_server(db, -1);
 
 	printf("set... ");
 	timer_start();
diff --git a/libnmdb/test1d.c b/libnmdb/test1d.c
index 51e4f83..a303741 100644
--- a/libnmdb/test1d.c
+++ b/libnmdb/test1d.c
@@ -28,11 +28,12 @@ int main(int argc, char **argv)
 	val = (unsigned char *) argv[3];
 	vsize = strlen((char *) val);
 
-	db = nmdb_init(-1);
+	db = nmdb_init();
 	if (db == NULL) {
 		perror("nmdb_init() failed");
 		return 1;
 	}
+	nmdb_add_tipc_server(db, -1);
 
 	printf("set... ");
 	timer_start();
diff --git a/libnmdb/test2c.c b/libnmdb/test2c.c
index 1422db9..bf8624b 100644
--- a/libnmdb/test2c.c
+++ b/libnmdb/test2c.c
@@ -44,11 +44,12 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
-	db = nmdb_init(-1);
+	db = nmdb_init();
 	if (db == NULL) {
 		perror("nmdb_init() failed");
 		return 1;
 	}
+	nmdb_add_tipc_server(db, -1);
 
 	timer_start();
 	for (i = 0; i < times; i++) {
diff --git a/libnmdb/test2cm.c b/libnmdb/test2cm.c
index 222ff3f..efc3a45 100644
--- a/libnmdb/test2cm.c
+++ b/libnmdb/test2cm.c
@@ -44,16 +44,16 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
-	db = nmdb_init(-1);
+	db = nmdb_init();
 	if (db == NULL) {
 		perror("nmdb_init() failed");
 		return 1;
 	}
 
-	if (!nmdb_add_server(db, 11) ||
-			!nmdb_add_server(db, 12) ||
-			!nmdb_add_server(db, 13)) {
-		perror("nmdb_add_server() failed");
+	if (!nmdb_add_tipc_server(db, 11) ||
+			!nmdb_add_tipc_server(db, 12) ||
+			!nmdb_add_tipc_server(db, 13)) {
+		perror("nmdb_add_tipc_server() failed");
 		return 1;
 	}
 
diff --git a/libnmdb/test2d.c b/libnmdb/test2d.c
index d24b748..d6cf2c7 100644
--- a/libnmdb/test2d.c
+++ b/libnmdb/test2d.c
@@ -44,11 +44,12 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
-	db = nmdb_init(-1);
+	db = nmdb_init();
 	if (db == NULL) {
 		perror("nmdb_init() failed");
 		return 1;
 	}
+	nmdb_add_tipc_server(db, -1);
 
 	timer_start();
 	for (i = 0; i < times; i++) {
diff --git a/libnmdb/test2dm.c b/libnmdb/test2dm.c
index 0ed89fd..c417096 100644
--- a/libnmdb/test2dm.c
+++ b/libnmdb/test2dm.c
@@ -44,16 +44,16 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
-	db = nmdb_init(-1);
+	db = nmdb_init();
 	if (db == NULL) {
 		perror("nmdb_init() failed");
 		return 1;
 	}
 
-	if (!nmdb_add_server(db, 11) ||
-			!nmdb_add_server(db, 12) ||
-			!nmdb_add_server(db, 13)) {
-		perror("nmdb_add_server() failed");
+	if (!nmdb_add_tipc_server(db, 11) ||
+			!nmdb_add_tipc_server(db, 12) ||
+			!nmdb_add_tipc_server(db, 13)) {
+		perror("nmdb_add_tipc_server() failed");
 		return 1;
 	}