public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - config: make confdb2ldap compile with latest corosync
@ 2009-03-11 11:43 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-03-11 11:43 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e467f34fea8c00f4279eb008ab4506000b5723fe
Commit: e467f34fea8c00f4279eb008ab4506000b5723fe
Parent: 96643d0de820ef72c6e93736bcd5a01b72ff5d89
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Wed Mar 11 11:42:24 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Wed Mar 11 11:42:24 2009 +0000
config: make confdb2ldap compile with latest corosync
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
config/tools/ldap/confdb2ldif.c | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/config/tools/ldap/confdb2ldif.c b/config/tools/ldap/confdb2ldif.c
index 0606d7e..5086a22 100644
--- a/config/tools/ldap/confdb2ldif.c
+++ b/config/tools/ldap/confdb2ldif.c
@@ -7,7 +7,6 @@
#include <sys/types.h>
#include <sys/un.h>
-#include <openais/saAis.h>
#include <corosync/confdb.h>
confdb_callbacks_t callbacks = {
@@ -55,9 +54,9 @@ static char *ldap_attr_name(char *attrname)
/* Recursively dump the object tree */
-static void print_config_tree(confdb_handle_t handle, unsigned int parent_object_handle, char *dn, char *fulldn)
+static void print_config_tree(confdb_handle_t handle, hdb_handle_t parent_object_handle, char *dn, char *fulldn)
{
- unsigned int object_handle;
+ hdb_handle_t object_handle;
char object_name[1024];
int object_name_len;
char key_name[1024];
@@ -73,13 +72,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) {
- printf( "error resetting key iterator for object %d: %d\n", parent_object_handle, res);
+ if (res != CS_OK) {
+ printf( "error resetting key iterator for object %llu: %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,17 +103,17 @@ 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) {
- printf( "error resetting object iterator for object %d: %d\n", parent_object_handle, res);
+ if (res != CS_OK) {
+ printf( "error resetting object iterator for object %llu: %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) {
- unsigned int parent;
+ while ( (res = confdb_object_iter(handle, parent_object_handle, &object_handle, object_name, &object_name_len)) == CS_OK) {
+ hdb_handle_t parent;
res = confdb_object_parent_get(handle, object_handle, &parent);
- if (res != SA_AIS_OK) {
- printf( "error getting parent for object %d: %d\n", object_handle, res);
+ if (res != CS_OK) {
+ printf( "error getting parent for object %llu: %d\n", object_handle, res);
return;
}
@@ -122,7 +121,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);
@@ -145,7 +144,7 @@ int main(int argc, char *argv[])
{
confdb_handle_t handle;
int result;
- unsigned int cluster_handle;
+ hdb_handle_t cluster_handle;
char *clusterroot = "cluster";
char basedn[1024];
@@ -167,7 +166,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 +174,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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-11 11:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 11:43 cluster: STABLE3 - config: make confdb2ldap compile with latest corosync Christine Caulfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).