Commit Graph

1789 Commits

Author SHA1 Message Date
Jim Meyering
8ef14f11eb 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
2009-04-09 20:53:03 +00:00
Jim Meyering
e002172704 coroapi.h: change lib_handler_fn's *msg to be const
Make a tiny type change and watch it propagate.
* include/corosync/engine/coroapi.h
(struct corosync_lib_handler) [lib_handler_fn]: Change type
of 2nd parameter: s/void *msg/const void *msg/.
Propagate the above into cfg.c and votequorum.c:
* services/cfg.c (message_handler_req_lib_cfg_get_node_addrs):
Constification exposed a bug in this function whereby it mistakenly
modified storage through its now-const *msg parameter.  Since it
did that solely to store a temporary result, we've changed it
to use a local variable instead.
* services/votequorum.c (message_handler_req_lib_votequorum_setvotes):
Likewise.
* exec/vsf_quorum.c: add const to msg param.
* services/evs.c: Likewise.
* services/pload.c: Likewise.
* services/cpg.c: Likewise.
* services/confdb.c: Likewise.
* exec/coroipcs.h: signature of coroipcs_handler_fn_lvalue must match
that of lib_handler_fn; noted via main.c.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2047 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-09 12:32:59 +00:00
Jim Meyering
09eeca1299 testevsth.c: const+size_t: evs_deliver_fn, evs_confchg_fn
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2046 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-09 12:32:49 +00:00
Jim Meyering
a44f4e70e6 coroipcc.h (coroipcc_msg_send_reply_receive): Make res_len size_t.
* include/corosync/coroipcc.h (coroipcc_msg_send_reply_receive):
change type of res_len parameter.
* lib/coroipcc.c (coroipcc_reply_receive): Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2045 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:30:02 +00:00
Jim Meyering
3df307a36d sync the rest of the code with previous header changes
* exec/coroipcs.c (coroipcs_response_send)
(coroipcs_dispatch_send):
* exec/coroipcs.h (handler_fn_get):
* include/corosync/cpg.h (cpg_deliver_fn_t, cpg_confchg_fn_t):
* test/cpgbench.c (cpg_bm_confchg_fn, cpg_bm_deliver_fn):
* test/testcpg.c (print_cpgname, DeliverCallback)
(ConfchgCallback):
* test/testcpg2.c (deliver, confch):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2044 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:53 +00:00
Jim Meyering
1eabb733c6 cpg.h, coroapi.h: more size_t and const changes
* include/corosync/cpg.h (cpg_deliver_fn_t, cpg_confchg_fn_t)
(cpg_groups_get_fn_t):
* include/corosync/engine/coroapi.h (ipc_response_send)
(ipc_dispatch_send, tpg_join, tpg_leave, tpg_groups_mcast)
(tpg_groups_reserve):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2043 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:45 +00:00
Jim Meyering
00db317b82 sync the rest of the code with previous header changes
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2042 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:37 +00:00
Jim Meyering
b4c6217894 make all priv_data_pt pointers non-"const"
I'd suspected this would be necessary, but until now hadn't
found a case in which it actually was.  That case:
totemconfig.c's totem_key_change_notify.
It has a priv_data_pt parameter that is used like this:

  struct totem_config *totem_config = priv_data_pt;

and totem_config is in turn passed as arg #2 to
totem_volatile_config_read, where it is decidedly non-const.

git grep -l 'const void \*priv' \
  |xargs perl -pi -e 's,const (void \*priv_data_pt),$1,'

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2041 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:27 +00:00
Jim Meyering
62e71c31d6 coroapi.h, confdb.h, objdb.h: big s/int/size_t/ change
* exec/mainconfig.c (objdb_get_string, objdb_get_int):
* exec/totemconfig.c (objdb_get_string, objdb_get_int)
(totem_config_keyread, totem_key_change_notify):
* include/corosync/confdb.h (confdb_callbacks_t):
* include/corosync/engine/coroapi.h (group_len, object_len)
(key_len, validate_callback, object_key_change_notify_fn_t)
(object_create_notify_fn_t, object_destroy_notify_fn_t)
(object_notify_callback_fn_t, object_reload_notify_fn_t)
(object_create, object_key_create, object_find_create)
(object_key_get, object_key_replace, object_key_delete)
(object_iter, object_key_iter, object_name_get)
(object_key_iter_from, object_key_increment)
(object_key_decrement):
* include/corosync/engine/objdb.h (object_key_change_notify_fn_t)
(object_create_notify_fn_t, object_destroy_notify_fn_t)
(object_len, key_len, validate_callback, object_create)
(object_key_create, object_find_create, object_key_get)
(object_key_replace, object_key_delete, object_iter)
(object_key_iter, object_name_get, object_key_iter_from)
(object_key_increment, object_key_decrement):
* lib/confdb.c (confdb_object_create, confdb_key_create)
(confdb_key_delete, confdb_key_get, confdb_key_increment)
(confdb_key_decrement, confdb_key_replace, confdb_object_find)
(confdb_object_iter, confdb_key_iter):
* lib/sa-confdb.c (confdb_sa_object_create, confdb_sa_key_create)
(confdb_sa_key_delete, confdb_sa_key_get)
(confdb_sa_key_increment, confdb_sa_key_decrement)
(confdb_sa_key_replace, confdb_sa_object_find)
(confdb_sa_object_iter, confdb_sa_key_iter):
* lib/sa-confdb.h:
* services/confdb.c (message_handler_req_lib_confdb_key_replace):
* services/votequorum.c (objdb_get_string, objdb_get_int)
(quorum_key_change_notify, votequorum_objdb_reload_notify):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2040 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:16 +00:00
Jim Meyering
66c168efee totemconfig.c: don't hard-code "128"...
* exec/totemconfig.c (read_keyfile): Don't hard-code "128".
Use sizeof(...) instead.
Avoid duplicate "close(fd)" calls.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2039 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:29:07 +00:00
Jim Meyering
4995054ca2 totemconfig.c: don't let a key of length > 128 clobber memory
* exec/totemconfig.c (totem_config_keyread): Reject a key with length
greater than that of our private_key buffer.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2038 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:28:56 +00:00
Jim Meyering
fdf9b231f6 totem.h: use symbolic array dimensions in public struct members
* include/corosync/totem/totem.h:
(TOTEM_PRIVATE_KEY_LEN, TOTEM_RRP_MODE_BYTES): Define.
(struct totem_config): Use the new names, rather than literals.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2037 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:28:48 +00:00
Jim Meyering
3f5ef99781 totempg.h: change type of totempg_group.group_len from int to size_t
* include/corosync/totem/totempg.h (struct totempg_group) [group_len]:
Change member type from int to size_t.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2036 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:28:40 +00:00
Jim Meyering
f930dbef8b rmd.h: adjust types (const+size_t) of prototype
* include/corosync/rmd.h: ...even though there are no definitions
for these functions.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2035 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:28:31 +00:00
Jim Meyering
ab7b859d8a sync.c: avoid printf format warning
* exec/sync.c (sync_deliver_fn): cast to unsigned long int, use %lu

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2034 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 07:57:36 +00:00
Jim Meyering
373254bdb9 sync.c: avoid warning about now-unused variables
* exec/sync.c (vsf_none, vsf_iface): Remove decls of now-unused
file-scoped variables.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2033 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 07:57:18 +00:00
Jim Meyering
29eb77a9fb convert each "size_t iov_len" declaration to "unsigned int iov_len"
Via this command:
git grep -l -E 'size_t[[:blank:]]+iov_len' \
  | xargs perl -pi -e 's/((?:^|,)\s*)size_t\s+(iov_len)/${1}unsigned int $2/'

Affected files and (functions/macros):
* exec/totempg.c (totempg_groups_mcast_groups)
(totempg_groups_send_ok_groups):
* include/corosync/evs.h (evs_callbacks_t):
* include/corosync/totem/totempg.h (TOTEMPG_SAFE):
* lib/evs.c (evs_mcast_joined, evs_mcast_groups):
* man/cpg_mcast_joined.3:
* man/evs_mcast_groups.3:
* man/evs_mcast_joined.3:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2032 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 07:56:54 +00:00
Jim Meyering
36eefbadef Convert all "int iov_len" decls to "unsigned int iov_len".
Used this command:
git grep -l 'int iov_len' \
  | xargs perl -pi -e 's/((?:^|,)\s*)(int iov_len)/${1}unsigned $2/'

Here's an approximate (autogenerated by vc-chlog) list of affected
file names and functions/macros:
* README.devmap:
* exec/coroipcs.c (sending_allowed_private_data)
(coroipcs_response_iov_send, msg_send, msg_send_or_queue)
(coroipcs_dispatch_iov_send):
* exec/coroipcs.h (handler_fn_get):
* exec/main.c (deliver_fn, main_mcast):
* exec/main.h (FALSE):
* exec/sync.c (vsf_iface, sync_deliver_fn):
* exec/totemmrp.c (totemsrp_handle_in, pg_deliver_fn)
(totemmrp_deliver_fn, totemmrp_initialize, totemmrp_mcast):
* exec/totemmrp.h (TOTEMMRP_H_DEFINED):
* exec/totemnet.c (iov_len, encrypt_and_sign_worker)
(ucast_sendmsg, mcast_sendmsg, totemnet_token_send):
* exec/totemnet.h (TOTEMNET_FLUSH):
* exec/totempg.c (deliver_fn, totempg_deliver_fn, mcast_msg)
(totempg_groups_initialize, totempg_groups_mcast_joined)
(totempg_groups_joined_reserve):
* exec/totemsrp.c (iov_len, totemsrp_recv, totemsrp_deliver_fn)
(totemsrp_initialize, totemsrp_mcast, token_send):
* exec/totemsrp.h (TOTEMSRP_H_DEFINED):
* exec/vsf_ykd.c (ykd_deliver_fn):
* include/corosync/coroipcc.h (handleInstanceDestructor):
* include/corosync/cpg.h (cpg_callbacks_t):
* include/corosync/engine/coroapi.h (ipc_response_iov_send)
(ipc_dispatch_iov_send, totem_mcast, tpg_init, tpg_joined_mcast)
(tpg_joined_reserve, tpg_groups_mcast, tpg_groups_reserve):
* include/corosync/totem/totempg.h (TOTEMPG_SAFE):
* lib/coroipcc.c (coroipcc_msg_send)
(coroipcc_msg_send_reply_receive)
(coroipcc_msg_send_reply_receive_in_buf):
* lib/cpg.c (cpg_mcast_joined):
* lib/util.h (versionsSupported):
* services/pload.c (send_message):
* services/votequorum.c (conn, quorum_deliver_fn):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2031 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 07:56:45 +00:00
Jim Meyering
2eba2a6cb8 continue pulling previous thread: mostly constification
* exec/apidef.c (typedef_tpg_join, typedef_tpg_leave)
(typedef_tpg_groups_mcast, typedef_tpg_groups_send_ok):
* exec/sync.c (barrier_data_process, sync_barrier_send)
(sync_start_init, sync_service_init, sync_start_process)
(sync_service_process, sync_deliver_fn, sync_request_send)
(sync_request):
* exec/sync.h (name):
* exec/totemmrp.c (totemmrp_callback_token_create):
* exec/totemmrp.h (TOTEMMRP_H_DEFINED):
* exec/totempg.c (list, app_confchg_fn)
(callback_token_received_fn, totempg_callback_token_create)
(totempg_groups_mcast_joined, totempg_groups_joined_release)
(totempg_groups_mcast_groups):
* exec/totemsrp.c (callback_fn, totemsrp_confchg_fn)
(totemsrp_initialize, totemsrp_callback_token_create):
* exec/totemsrp.h (TOTEMSRP_H_DEFINED):
* exec/vsf_ykd.c (ykd_state_send_msg, ykd_attempt_send_msg)
(ykd_confchg_fn):
* include/corosync/engine/coroapi.h (timer_add_absolute)
(totem_ifaces_print, totem_ip_print, totem_callback_token_create)
(sync_request, plugin_interface_reference):
* include/corosync/totem/totempg.h (TOTEMPG_SAFE):
* services/cpg.c (cpg_confchg_fn):
* services/pload.c (msgs_sent, pload_service_engine)
(send_message, start_mcasting):
* services/votequorum.c (conn, quorum_confchg_fn):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2030 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:44:59 +00:00
Jim Meyering
3a32139cfc *_confchg_fn: make pointer params const, change *_entries to be size_t
* exec/main.c (confchg_fn):
* exec/quorum.h (sync_callback_fn_t):
* exec/sync.c (sync_ring_id, barrier_data_process)
(sync_start_init, sync_service_process, sync_primary_callback_fn)
(sync_deliver_fn, sync_confchg_fn):
* exec/sync.h (name):
* exec/totemmrp.c (totemsrp_handle_in, pg_confchg_fn)
(totemmrp_confchg_fn, totemmrp_initialize):
* exec/totemmrp.h (TOTEMMRP_H_DEFINED):
* exec/totempg.c (confchg_fn, totempg_confchg_fn)
(totempg_groups_initialize):
* include/corosync/engine/coroapi.h (tpg_init, confchg_fn)
(sync_abort):
* include/corosync/totem/totempg.h (TOTEMPG_SAFE):
* services/cfg.c (shutdown_reply, cfg_confchg_fn)
(message_handler_req_exec_cfg_ringreenable):
* services/cpg.c (api, cpg_confchg_fn):
* services/evs.c (MESSAGE_REQ_EXEC_EVS_MCAST, evs_confchg_fn):
* services/pload.c (MESSAGE_REQ_EXEC_PLOAD_MCAST)
(pload_confchg_fn):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2029 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:44:50 +00:00
Jim Meyering
3b35d8a99c no-op change: s/gruop/group/ in prototypes and documentation
* include/corosync/engine/coroapi.h (tpg_join, tpg_leave):
* man/evs_mcast_groups.3:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2028 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:44:41 +00:00
Jim Meyering
e7fa045d5a totem: const+unsigned+size_t
* exec/totempg.c (totempg_groups_mcast_groups):
(totempg_groups_send_ok_groups):
* include/corosync/totem/totem.h (interface_count):
(private_key_len, threads, heartbeat_failures_allowed):
* include/corosync/totem/totempg.h:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2027 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:44:20 +00:00
Jim Meyering
0106be7668 rmd.h: s/int/size_t; const-correctness changes...
* include/corosync/rmd.h: in spite of these being unused interfaces

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2026 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:44:12 +00:00
Jim Meyering
23c1e2598c lcr_ckpt.h: unused file: const/size_t
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2025 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:43:54 +00:00
Jim Meyering
c2ce9d00bb ipc_evs.h: s/int/size_t
* include/corosync/ipc_evs.h (msglen, member_list_entries):
(left_list_entries, joined_list_entries, group_entries, msg_len):
(group_entries, msg_len, member_list_entries):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2024 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:43:36 +00:00
Jim Meyering
cf2c12a988 evs.h: s/int/size_t; const-correctness changes
* exec/sync.c (barrier_data_confchg_entries):
* include/corosync/evs.h (evs_deliver_fn_t, evs_confchg_fn_t):
(evs_callbacks_t):
* lib/evs.c (MIN, evs_join, evs_leave, evs_mcast_joined):
(evs_mcast_groups, evs_membership_get):
* test/evsbench.c (evs_deliver_fn, evs_confchg_fn):
* test/evsverify.c (evs_deliver_fn, evs_confchg_fn, main):
* test/testevs.c (evs_deliver_fn, evs_confchg_fn, main):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2023 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:43:17 +00:00
Jim Meyering
db4838bc35 quorum.h (quorum_set_quorate_fn_t): make first param const
* exec/quorum.h (sync_callback_fn_t):
* exec/sync.c (current_members_cnt, sync_primary_callback_fn):
* exec/sync.h (name):
* exec/vsf_quorum.c (sync_primary_callback_fn):
(quorum_api_set_quorum):
* exec/vsf_ykd.c (ykd_primary_callback_fn):
* include/corosync/engine/coroapi.h (sync_callback_fn_t):
* include/corosync/engine/quorum.h (quorum_set_quorate_fn_t):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2022 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:43:03 +00:00
Jim Meyering
4cb431fc54 quorum.h (quorum_set_quorate_fn_t): s/int/size_t/
propagate the change:
* include/corosync/engine/quorum.h (quorum_set_quorate_fn_t):
* exec/vsf_quorum.c (quorum_view_list_entries):
(quorum_api_set_quorum, quorum_exec_init_fn):
* exec/vsf_ykd.c (ykd_primary_callback_fn):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2021 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 06:42:29 +00:00
Steven Dake
c1d206eafb Remove wrong project name.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2020 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 21:42:59 +00:00
Steven Dake
12754324f9 Forward port of sync v1 engine from whitetank and rework of quorum
engine to not break syncing.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2019 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 21:41:25 +00:00
Jim Meyering
ce68ee76b9 accommodate iov_len of type size_t (i.e., never negative)
* services/pload.c (send_message): Don't test for iov_len < 0,
since it can no longer happen.
* lib/evs.c: Fix a typo in an iov_len-related FIXME comment.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2018 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 18:48:04 +00:00
Jim Meyering
f571a12d9b jhash.h (jhash2): make first parameter const
* include/corosync/jhash.h (jhash2): const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2017 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:04:19 +00:00
Jim Meyering
622bbd8299 lcr_comp.h: size_t
* include/corosync/lcr/lcr_comp.h (struct lcr_comp, struct lcr_iface):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2016 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:04:11 +00:00
Jim Meyering
8f9fafedbf list.h (list_empty): Make param const.
* include/corosync/list.h (list_empty): Make param const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2015 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:04:04 +00:00
Jim Meyering
af316a11b2 mar_cpg.h: make "src" params const.
* include/corosync/mar_cpg.h:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2014 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:03:51 +00:00
Jim Meyering
8defaf0c3f mar_gen.h: make params const
* include/corosync/mar_gen.h (get_mar_name_t, mar_name_match): const
* exec/util.h (get_mar_name_t, mar_name_match): Remove unneeded decls.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2013 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:03:30 +00:00
Jim Meyering
eb5919f0cc totemip.h: const'ify
* include/corosync/totem/totemip.h: Add const to prototypes.
* exec/totemip.c (totemip_equal, totemip_copy): Adjust.
(totemip_copy_endian_convert, totemip_localhost_check): Likewise.
(totemip_sockaddr_to_totemip_convert): Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2012 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:03:07 +00:00
Jim Meyering
ba9f2d8347 sq.h: const'ify, and avoid NULL-deref
* include/corosync/sq.h (sq_init): Avoid NULL-deref on malloc failure.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2011 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:02:43 +00:00
Jim Meyering
2331454b2b queue.h: Replace #ifdef COROSYNC_SOLARIS...
* include/corosync/queue.h: Remove #ifdef COROSYNC_SOLARIS
in favor of agnostic "#ifdef queue".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2010 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:02:13 +00:00
Jim Meyering
a549daedca logsys.h (logsys_format_set): Change return type, adjust param type.
* include/corosync/engine/logsys.h:
* exec/logsys.c (logsys_format_set): Return -1 upon strdup failure.
Change type of param to "const char *".
* exec/logsys.c (logsys_init): Adjust use.
* exec/mainconfig.c (corosync_main_config_read_logging): Adjust uses.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2009 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-07 13:01:55 +00:00
Steven Dake
1eb7b648f1 Revert constructor priority in logsys.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2008 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 21:11:55 +00:00
Steven Dake
70ac3e77de Remove extra printf from coropoll.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2007 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 21:07:23 +00:00
Steven Dake
acac398abb Fix timers not expiring.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2006 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 21:07:11 +00:00
Jim Meyering
41b1ba0e77 remove 3 useless casts
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2005 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:45 +00:00
Jim Meyering
6b9505992f confdb.h (confdb_reload) Add errbuf_len parameter and propagate.
* include/corosync/confdb.h (confdb_callbacks_t):
* lib/confdb.c (confdb_reload):
* lib/sa-confdb.c (confdb_sa_reload):
* lib/sa-confdb.h:
* test/testconfdb.c (main):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2004 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:38 +00:00
Jim Meyering
b6378dc05d confdb_sa_write: propagate errbuf_len parameter
* lib/sa-confdb.c (confdb_sa_write): Propagate errbuf_len parameter.
* lib/sa-confdb.h: Update prototype

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2003 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:24 +00:00
Jim Meyering
1308223dab confdb.h: error_text vs. buflen
* lib/confdb.c (MIN): Define.
(confdb_write): Use new errbuf_len parameter.
Also note bugs (Chrissie confirms) that error_text is not
set in two error-return cases.
* test/testconfdb.c (do_write_tests): Update use of confdb_write.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2002 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:12 +00:00
Jim Meyering
781d3454c2 confdb.h: continue API changes: const+size_t
* include/corosync/confdb.h (confdb_object_create_notify_fn_t):
(confdb_object_delete_notify_fn_t):
* tools/corosync-objctl.c (tail_object_created, tail_object_deleted):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2001 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:30:54 +00:00
Jim Meyering
41cc0e06b4 print "?" in place of non-printing bytes of obj/key/val values
* tools/corosync-objctl.c: Include <ctype.h>
(print_name): New function.
(tail_key_changed): Use it to avoid printing garbage to screen.
* include/corosync/confdb.h (confdb_key_change_notify_fn_t): Convert
type of "int" length params to "size_t".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2000 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:30:41 +00:00
Jim Meyering
1701b32f1d confdb.h (confdb_key_change_notify_fn_t): Make 3 params "const"
* include/corosync/confdb.h (confdb_key_change_notify_fn_t):
Make 3 params const.
* tools/corosync-objctl.c (find_object_of_type_t, callbacks):
(tail_key_changed): Don't write into would-be-const members.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1999 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:30:33 +00:00