This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: master - config: ldap convertor should use CS_ codes ratherthan SA_AIS ones


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1793c3e6f9b6971d1f1e7025304adf158e7b7d97
Commit:        1793c3e6f9b6971d1f1e7025304adf158e7b7d97
Parent:        04e717ba27ee1ca98095e2a59ea11b53142e458b
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Wed Jan 7 14:03:31 2009 +0000
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Wed Jan 7 14:03:31 2009 +0000

config: ldap convertor should use CS_ codes rather than SA_AIS ones

 ... really this time ...

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 config/tools/ldap/confdb2ldif.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/config/tools/ldap/confdb2ldif.c b/config/tools/ldap/confdb2ldif.c
index 0606d7e..f4bd7a9 100644
--- a/config/tools/ldap/confdb2ldif.c
+++ b/config/tools/ldap/confdb2ldif.c
@@ -7,7 +7,7 @@
 #include <sys/types.h>
 #include <sys/un.h>
 
-#include <openais/saAis.h>
+#include <corosync/corotypes.h>
 #include <corosync/confdb.h>
 
 confdb_callbacks_t callbacks = {
@@ -73,13 +73,13 @@ static void print_config_tree(confdb_handle_t handle, unsigned int parent_object
 
 	/* Show the keys */
 	res = confdb_key_iter_start(handle, parent_object_handle);
-	if (res != SA_AIS_OK) {
+	if (res != CS_OK) {
 		printf( "error resetting key iterator for object %d: %d\n", parent_object_handle, res);
 		return;
 	}
 
 	while ( (res = confdb_key_iter(handle, parent_object_handle, key_name, &key_name_len,
-				       key_value, &key_value_len)) == SA_AIS_OK) {
+				       key_value, &key_value_len)) == CS_OK) {
 		key_name[key_name_len] = '\0';
 		key_value[key_value_len] = '\0';
 
@@ -104,16 +104,16 @@ static void print_config_tree(confdb_handle_t handle, unsigned int parent_object
 
 	/* Show sub-objects */
 	res = confdb_object_iter_start(handle, parent_object_handle);
-	if (res != SA_AIS_OK) {
+	if (res != CS_OK) {
 		printf( "error resetting object iterator for object %d: %d\n", parent_object_handle, res);
 		return;
 	}
 
-	while ( (res = confdb_object_iter(handle, parent_object_handle, &object_handle, object_name, &object_name_len)) == SA_AIS_OK)	{
+	while ( (res = confdb_object_iter(handle, parent_object_handle, &object_handle, object_name, &object_name_len)) == CS_OK)	{
 		unsigned int parent;
 
 		res = confdb_object_parent_get(handle, object_handle, &parent);
-		if (res != SA_AIS_OK) {
+		if (res != CS_OK) {
 			printf( "error getting parent for object %d: %d\n", object_handle, res);
 			return;
 		}
@@ -122,7 +122,7 @@ static void print_config_tree(confdb_handle_t handle, unsigned int parent_object
 
 		/* Check for "name", and create dummy parent object */
 		res = confdb_key_get(handle, object_handle, "name", strlen("name"), key_value, &key_value_len);
-		if (res == SA_AIS_OK) {
+		if (res == CS_OK) {
 			sprintf(cumulative_dn, "cn=%s,%s", object_name, fulldn);
 			printf("\n");
 			printf("dn: %s\n", cumulative_dn);
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
 	}
 
 	result = confdb_initialize (&handle, &callbacks);
-	if (result != SA_AIS_OK) {
+	if (result != CS_OK) {
 		printf ("Could not initialize Cluster Configuration Database API instance error %d\n", result);
 		exit (1);
 	}
@@ -175,13 +175,13 @@ int main(int argc, char *argv[])
 	/* Find the starting object ... this should be a param */
 
 	result = confdb_object_find_start(handle, OBJECT_PARENT_HANDLE);
-	if (result != SA_AIS_OK) {
+	if (result != CS_OK) {
 		printf ("Could not start object_find %d\n", result);
 		exit (1);
 	}
 
 	result = confdb_object_find(handle, OBJECT_PARENT_HANDLE, clusterroot, strlen(clusterroot), &cluster_handle);
-	if (result != SA_AIS_OK) {
+	if (result != CS_OK) {
 		printf ("Could not object_find \"cluster\": %d\n", result);
 		exit (1);
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]