Commit Graph

70 Commits

Author SHA1 Message Date
Steven Dake
03c33697f2 Update copyright dates in util directory
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Fabio Di Nitto <fdinitto@redhat.com>
2012-02-13 17:05:04 -07:00
Jan Friesse
9260efdf47 Add CS_DISPATCH_ONE_NONBLOCKING dispatch type
Add missing option for dispatch, which fills gap in combination of
block/nonblock and one/all dispatch types. New type doesn't mask
CS_ERR_TRY_AGAIN, and it means "no message was processed".

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-02-08 16:03:46 +01:00
Fabio M. Di Nitto
4120a2c1cb corotypes: drop deprecated EVS_ defines
none of our current dependencies use it.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-02-08 13:37:46 +01:00
Angus Salkeld
9e36255b8e IPC: don't block forever on a recv msg as corosync might be gone.
This at least will not make the client hang forever.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-01-10 08:32:31 +11:00
Steven Dake
3ad0979dc1 Remove dead code in evs service
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-21 03:01:01 -07:00
Angus Salkeld
c6895faa05 libqb: change ipc -> qb_ipc
IPC: return 0/-ENOBUFS from message handler
IPC: use the new rate_limit API to improve perf.
CPG: add send_async API & hook up flow control
IPC: Fix flow control getting stuck.
IPC: Port the remaining libs to use libqb IPC
IPC: remove libqb flowcontrol API
TEST: put cpg_dispatch() in it's own thread
IPC: cleanup ipc_glue.c name everything cs_ipcs_*()
IPC: add back statistics
IPC: remove coroipcc_ symbols from lib*.versions
IPC: init each se's IPC as it is loaded.
IPC: use the new connection_closed() event to free the context.
IPC: re-add zero copy functionality back
IPC: remove cpg_mcast_joined_async() and make it the default
 -> now cpg_mcast_joined() == cpg_mcast_joined_async()
libqb: expose a libqb error converter
libqb: add missing error conversions
libqb: remove repeat try loop in lib/cpg.c
CPG: fix zero copy mcast
CPG: use newer return codes
Add ENOTCONN to qb_to_cs_error()
libqb: fix error conversion from errno to cs_error_t in confdb
libqb: change errno_to_cs to qb_to_cs_error
libqb: add a cs_strerror() to get a more meaningful message
libqb: fix some confusing error conversions.
libqb: set the timeout on recv's to -1 (wait forever)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 10:37:14 +10:00
Steven Dake
5408399b23 Remove problem where NULL dispatch handler functions would result in lockup
of the dispatch if they were sent by a service engine.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2754 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-02 00:10:43 +00:00
Angus Salkeld
3848fc2069 COVERITY 4: remove dead code in XYZ_dispatch().
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2549 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-23 00:32:31 +00:00
Steven Dake
f170a431ce Fix error with revision 2415.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2416 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-14 20:27:45 +00:00
Steven Dake
c14c130df5 Fix dispatch returning TRY_AGAIN when using DISPATCH_ALL parameter because of
regression caused by revision 2046:lib/coroipcc.c.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2415 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-14 18:58:08 +00:00
Jan Friesse
8eeeccbf00 Handle NULL callbacks in cpg, evs and confdb lib
Attached patches handle NULL callbacks in *_initialize
and *_dispatch. Handling is same as in quorum service. Now, when
callback is NULL -> no memcpy -> instance callbacks will have all
items set to NULL and in *_dispatch function is not called.

It changes cfg so now we are using continue instead of exit.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2392 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-20 10:50:11 +00:00
Steven Dake
2a31caedd3 Add ring id field to evs.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2341 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-01 20:57:37 +00:00
Steven Dake
453ef211c1 Pass handle is evs callback functions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2339 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-01 20:21:48 +00:00
Steven Dake
130d9c9908 Add context get and set operations to evs handles and man pages.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2329 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-01 06:27:00 +00:00
Steven Dake
b8e3951ca1 Add (void *) casts for iovector assignments to remove compile warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2270 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 20:43:12 +00:00
Jan Friesse
204026fa0d *Dispatch returns CS_ERR_BAD_HANDLE only on first hdb_get
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2197 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-20 13:11:23 +00:00
Steven Dake
bf624c727d Implement thread saftey in corosync trunk.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2165 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-29 07:21:21 +00:00
Steven Dake
51ef3b5c00 Include file cleanups.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2134 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-23 17:03:21 +00:00
Steven Dake
1beb0c1fbd Remove saHandleXXX and friends and use hdb instead.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2125 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 17:43:54 +00:00
Steven Dake
8126cf7458 Reworking of include file dependencies.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2119 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 09:01:30 +00:00
Jim Meyering
904a10ed38 remove all trailing blanks
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2117 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:03:55 +00:00
Steven Dake
cee464489f Change shared memory to use mmap() system calls.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2115 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 05:41:30 +00:00
Steven Dake
cd154d63e6 Use spinlocks in library handle references.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2099 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-20 18:03:10 +00:00
Steven Dake
0969721db3 Rework how dispatch functions so service engines work properly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2079 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:06:14 +00:00
Jim Meyering
270e9da193 change a few "int msg_len" to "size_t msg_len"; adjust docs
* lib/cpg.c (cpg_mcast_joined):
* lib/evs.c (evs_mcast_joined, evs_mcast_groups):
* man/cpg_initialize.3:
* man/evs_initialize.3:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2060 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 06:52:16 +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
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
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
514159407f coroipcc. h (coroipcc_dispatch_recv): Add a buflen parameter.
* lib/coroipcc.c (coroipcc_dispatch_recv): Update definition, and...
(memcpy_swrap): ... add a parameter here, too.
* include/corosync/coroipcc.h (coroipcc_dispatch_recv):
* lib/cfg.c (corosync_cfg_dispatch):
* lib/confdb.c (confdb_dispatch):
* lib/cpg.c (cpg_dispatch, cpg_flow_control_state_get):
* lib/evs.c (evs_dispatch):
* lib/quorum.c (quorum_dispatch):
* lib/votequorum.c (votequorum_dispatch):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1995 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 18:35:04 +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
Fabio M. Di Nitto
031c02f589 - Every .c file should include "config.h" to get the right defines...
- services/Makefile.am: add include search paths for config.h

- include/corosync/cs_config.h.in exports LCRSODIR and SOCKETDIR

- tools/Makefile.am: drop -D defines for dirs that are now in
cs_config.h or config.h

- configure.ac: sanitize prefix and exec_prefix paths. Export DIRS in
*config.h

- lib/Makefile.am: : drop -D defines for dirs that are now in
cs_config.h or config.h. Add rule to build lcr_ifact.o or building from
lib/ fails miserably



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1877 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 12:58:53 +00:00
Steven Dake
c077255702 Whitetank IPC Forward Port.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1766 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-19 02:23:58 +00:00
Angus Salkeld
c049f8bf21 Fix coverity bug ID 4: remove unused code & fix compile error
In evs_dispatch()  the local ignore_dispatch is not used.
So I have removed this code.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1717 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-28 09:25:17 +00:00
Angus Salkeld
efb280c511 LINT: rename the overlay struct so they are uniq.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1694 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:26:58 +00:00
Angus Salkeld
fd25950970 LINT: fix or ignore unchecked return values.
If we don't care about the return value then typecase the return
value to void.
Else do something useful with the return value.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1693 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 17:25:22 +00:00
Angus Salkeld
56eaee9561 cleanup the last of the SAF headers and types
This includes the rename of identifiers from corosync to cs.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1689 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-06 21:49:07 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Fabien Thomas
0c92a5e564 reorganize include file to match installed tree to build openais without installing corosync; correct some warnings and error under FreeBSD and Darwin
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1632 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 14:59:50 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00
Steven Dake
46babc95ad Initial move of corosync and openais trees into seperate directories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1582 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-21 07:59:08 +00:00
Steven Dake
46b0163813 Change all email addresses that were sdake@mvista.com to sdake@redhat.com.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1541 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-05-12 13:48:06 +00:00
Steven Dake
e132bc580c Expose utils to the user
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1442 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:58:41 +00:00
Steven Dake
adb37f5d49 Now that -l is set correclt yuse #include <header.h> instead of using quotes.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1441 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:57:41 +00:00
Steven Dake
9d27cc2f35 Fix minor leaks caused by not calling pthread_mutex_destroy throughout the tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1412 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-08-07 23:52:21 +00:00
Patrick Caulfield
08dd4174c6 In trunk, totemip.h and totem.h call for "../include/swab.h" - this works fine
when building openais itself but causes problems when installed as those files
will not be in the right place.

So, I've moved these includes out of totemip.h and totem.h and into the .c files
that call them.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1370 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-05-05 14:02:53 +00:00
Steven Dake
90ccff6bbc Solaris port for openais
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1175 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-08-05 02:22:12 +00:00
Steven Dake
4946f988eb Fix processor count in evs interface.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1157 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-07-26 06:51:17 +00:00
Steven Dake
bcc232dcbc Rename saConnectServiceTwo to saConnectService
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1114 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-07-10 22:18:32 +00:00