Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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
d04418df5c coroipcs.h: avoid 3 warnings
* exec/coroipcs.h: Forward-declare "struct iovec".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1948 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:14:41 +00:00
Jim Meyering
f42de14a5a coroipcs.[ch]: remove 4 const-related warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1924 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:37 +00:00
Steven Dake
e77b1e21ad Make all threads use same scheduling priority even with -p option
specified to avoid deadlock in spinlocks.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1912 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-25 18:25:18 +00:00
Steven Dake
c5fc824d7f Abstracted Shared Memory IPC library
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1885 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 15:28:54 +00:00