public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE3 - config: make confdb2ldap compile with latest corosync Date: Wed, 11 Mar 2009 11:43:00 -0000 [thread overview] Message-ID: <20090311114251.067561201EB@lists.fedorahosted.org> (raw) 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); }
reply other threads:[~2009-03-11 11:43 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090311114251.067561201EB@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).