This patchset looks good but we are holding API changes until after we release a bugfix version of corosync/oa for the release of cluster-3.
Please keep this handy for a weekish until that blockage is stopped. Regards -steve On Wed, 2009-04-01 at 10:00 +0200, Jim Meyering wrote: > Three patches below: > > Subject: [PATCH 1/3] cfg.h: add const > Subject: [PATCH 2/3] cfg.h: adjust parameter types: const+s/int/size_t/ > Subject: [PATCH 3/3] cfg.h: mark "address_length" as an unused member > > Regarding the unused "address_length" member, I suspected > that it should have type socklen_t, but since I found it is > set but never used, I've just added a FIXME comment. > > > From 4a58eb4dfae11e3d0b206d5e791edea74fb6d32e Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Tue, 31 Mar 2009 21:16:31 +0200 > Subject: [PATCH 1/3] cfg.h: add const > > * lib/cfg.c (corosync_cfg_service_load): Make service_name "const". > (corosync_cfg_service_unload): Likewise. > * include/corosync/cfg.h: Update prototypes. > --- > include/corosync/cfg.h | 4 ++-- > lib/cfg.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/corosync/cfg.h b/include/corosync/cfg.h > index bb739d7..7c201bb 100644 > --- a/include/corosync/cfg.h > +++ b/include/corosync/cfg.h > @@ -178,13 +178,13 @@ corosync_cfg_ring_reenable ( > cs_error_t > corosync_cfg_service_load ( > corosync_cfg_handle_t cfg_handle, > - char *service_name, > + const char *service_name, > unsigned int service_ver); > > cs_error_t > corosync_cfg_service_unload ( > corosync_cfg_handle_t cfg_handle, > - char *service_name, > + const char *service_name, > unsigned int service_ver); > > cs_error_t > diff --git a/lib/cfg.c b/lib/cfg.c > index 5093da4..ec26b61 100644 > --- a/lib/cfg.c > +++ b/lib/cfg.c > @@ -426,7 +426,7 @@ corosync_cfg_ring_reenable ( > cs_error_t > corosync_cfg_service_load ( > corosync_cfg_handle_t cfg_handle, > - char *service_name, > + const char *service_name, > unsigned int service_ver) > { > struct cfg_instance *cfg_instance; > @@ -468,7 +468,7 @@ corosync_cfg_service_load ( > cs_error_t > corosync_cfg_service_unload ( > corosync_cfg_handle_t cfg_handle, > - char *service_name, > + const char *service_name, > unsigned int service_ver) > { > struct cfg_instance *cfg_instance; > -- > 1.6.2.rc1.285.gc5f54 > > > From 6b331485ffc6390f6c10441076aba3ea8c3cb11b Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Tue, 31 Mar 2009 21:31:56 +0200 > Subject: [PATCH 2/3] cfg.h: adjust parameter types: const+s/int/size_t/ > > * lib/cfg.c (corosync_cfg_get_node_addrs): Make "max_addrs" size_t. > (corosync_cfg_kill_node): Make "reason" const. > * include/corosync/cfg.h: Update prototypes. > --- > include/corosync/cfg.h | 4 ++-- > lib/cfg.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/corosync/cfg.h b/include/corosync/cfg.h > index 7c201bb..127fedf 100644 > --- a/include/corosync/cfg.h > +++ b/include/corosync/cfg.h > @@ -203,7 +203,7 @@ cs_error_t > corosync_cfg_kill_node ( > corosync_cfg_handle_t cfg_handle, > unsigned int nodeid, > - char *reason); > + const char *reason); > > cs_error_t > corosync_cfg_try_shutdown ( > @@ -231,7 +231,7 @@ cs_error_t > corosync_cfg_get_node_addrs ( > corosync_cfg_handle_t cfg_handle, > int nodeid, > - int max_addrs, > + size_t max_addrs, > int *num_addrs, > corosync_cfg_node_address_t *addrs); > > diff --git a/lib/cfg.c b/lib/cfg.c > index ec26b61..326c5dc 100644 > --- a/lib/cfg.c > +++ b/lib/cfg.c > @@ -676,7 +676,7 @@ cs_error_t > corosync_cfg_kill_node ( > corosync_cfg_handle_t cfg_handle, > unsigned int nodeid, > - char *reason) > + const char *reason) > { > struct cfg_instance *cfg_instance; > struct req_lib_cfg_killnode req_lib_cfg_killnode; > @@ -798,7 +798,7 @@ corosync_cfg_replyto_shutdown ( > cs_error_t corosync_cfg_get_node_addrs ( > corosync_cfg_handle_t cfg_handle, > int nodeid, > - int max_addrs, > + size_t max_addrs, > int *num_addrs, > corosync_cfg_node_address_t *addrs) > { > -- > 1.6.2.rc1.285.gc5f54 > > > From 11375e128488503fadf890f07d21ddc09fa303e2 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Tue, 31 Mar 2009 22:52:11 +0200 > Subject: [PATCH 3/3] cfg.h: mark "address_length" as an unused member > > * include/corosync/cfg.h: Add a FIXME comment. > --- > include/corosync/cfg.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/include/corosync/cfg.h b/include/corosync/cfg.h > index 127fedf..73f7833 100644 > --- a/include/corosync/cfg.h > +++ b/include/corosync/cfg.h > @@ -133,7 +133,7 @@ typedef struct { > */ > typedef struct > { > - int address_length; > + int address_length; /* FIXME: set but never used */ > char address[sizeof(struct sockaddr_in6)]; > } corosync_cfg_node_address_t; > _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
