From 8ef14f11eb1a131d5f35a5a279b9c94f7eaed54c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 9 Apr 2009 20:53:03 +0000 Subject: [PATCH] cpg.h, objdb.h, coroaph.h: more const/size_t * include/corosync/cpg.h (cpg_callbacks_t): * include/corosync/mar_cpg.h (marshall_to_mar_cpg_name_t): * lib/cpg.c (cpg_join, cpg_leave): * lib/cpg.c (cpg_mcast_joined): make iovec const. * include/corosync/cpg.h (cpg_mcast_joined): update prototype ... git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2048 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/objdb.c | 4 ++-- include/corosync/cpg.h | 8 ++++---- include/corosync/engine/coroapi.h | 5 +++-- include/corosync/engine/objdb.h | 4 ++-- lib/cpg.c | 8 ++++---- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/exec/objdb.c b/exec/objdb.c index 609fe5de..d04f9595 100644 --- a/exec/objdb.c +++ b/exec/objdb.c @@ -673,7 +673,7 @@ static int object_destroy ( static int object_valid_set ( hdb_handle_t object_handle, struct object_valid *object_valid_list, - unsigned int object_valid_list_entries) + size_t object_valid_list_entries) { struct object_instance *instance; unsigned int res; @@ -701,7 +701,7 @@ error_exit: static int object_key_valid_set ( hdb_handle_t object_handle, struct object_key_valid *object_key_valid_list, - unsigned int object_key_valid_list_entries) + size_t object_key_valid_list_entries) { struct object_instance *instance; unsigned int res; diff --git a/include/corosync/cpg.h b/include/corosync/cpg.h index 6e849d39..8093dfba 100644 --- a/include/corosync/cpg.h +++ b/include/corosync/cpg.h @@ -130,7 +130,7 @@ cs_error_t cpg_fd_get ( cpg_handle_t handle, int *fd); -/* +/* * Get and set contexts for a CPG handle */ cs_error_t cpg_context_get ( @@ -157,14 +157,14 @@ cs_error_t cpg_dispatch ( */ cs_error_t cpg_join ( cpg_handle_t handle, - struct cpg_name *group); + const struct cpg_name *group); /* * Leave one or more groups */ cs_error_t cpg_leave ( cpg_handle_t handle, - struct cpg_name *group); + const struct cpg_name *group); /* * Multicast to groups joined with cpg_join. @@ -174,7 +174,7 @@ cs_error_t cpg_leave ( cs_error_t cpg_mcast_joined ( cpg_handle_t handle, cpg_guarantee_t guarantee, - struct iovec *iovec, + const struct iovec *iovec, unsigned int iov_len); /* diff --git a/include/corosync/engine/coroapi.h b/include/corosync/engine/coroapi.h index 6f6c69d8..25375573 100644 --- a/include/corosync/engine/coroapi.h +++ b/include/corosync/engine/coroapi.h @@ -244,12 +244,12 @@ struct corosync_api_v1 { int (*object_valid_set) ( hdb_handle_t object_handle, struct object_valid *object_valid_list, - unsigned int object_valid_list_entries); + size_t object_valid_list_entries); int (*object_key_valid_set) ( hdb_handle_t object_handle, struct object_key_valid *object_key_valid_list, - unsigned int object_key_valid_list_entries); + size_t object_key_valid_list_entries); int (*object_find_create) ( hdb_handle_t parent_object_handle, @@ -415,6 +415,7 @@ struct corosync_api_v1 { int (*totem_ring_reenable) (void); + /* FIXME: const iovec? */ int (*totem_mcast) (struct iovec *iovec, unsigned int iov_len, unsigned int guarantee); int (*totem_ifaces_get) ( diff --git a/include/corosync/engine/objdb.h b/include/corosync/engine/objdb.h index 56cd8a7c..ce401a98 100644 --- a/include/corosync/engine/objdb.h +++ b/include/corosync/engine/objdb.h @@ -119,12 +119,12 @@ struct objdb_iface_ver0 { int (*object_valid_set) ( hdb_handle_t object_handle, struct object_valid *object_valid_list, - unsigned int object_valid_list_entries); + size_t object_valid_list_entries); int (*object_key_valid_set) ( hdb_handle_t object_handle, struct object_key_valid *object_key_valid_list, - unsigned int object_key_valid_list_entries); + size_t object_key_valid_list_entries); int (*object_find_create) ( hdb_handle_t parent_object_handle, diff --git a/lib/cpg.c b/lib/cpg.c index 74b0e2f5..5ac35557 100644 --- a/lib/cpg.c +++ b/lib/cpg.c @@ -1,7 +1,7 @@ /* * vi: set autoindent tabstop=4 shiftwidth=4 : * - * Copyright (c) 2006-2008 Red Hat, Inc. + * Copyright (c) 2006-2009 Red Hat, Inc. * * All rights reserved. * @@ -386,7 +386,7 @@ error_put: cs_error_t cpg_join ( cpg_handle_t handle, - struct cpg_name *group) + const struct cpg_name *group) { cs_error_t error; struct cpg_inst *cpg_inst; @@ -449,7 +449,7 @@ error_exit: cs_error_t cpg_leave ( cpg_handle_t handle, - struct cpg_name *group) + const struct cpg_name *group) { cs_error_t error; struct cpg_inst *cpg_inst; @@ -492,7 +492,7 @@ error_exit: cs_error_t cpg_mcast_joined ( cpg_handle_t handle, cpg_guarantee_t guarantee, - struct iovec *iovec, + const struct iovec *iovec, unsigned int iov_len) { int i;