Angus Salkeld
cb536a12ce
cov 10384: better error handling from accept()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2827 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:06:30 +00:00
Angus Salkeld
96c9360c79
cov 10383: impove the error handling after socket()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2826 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:06:00 +00:00
Angus Salkeld
20f3331d0e
convert strerror() into strerror_r()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:28:36 +00:00
Angus Salkeld
2290913d28
convert readdir into readdir_r
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2664 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:26:54 +00:00
Steven Dake
32ff97b87b
Remove hdb constructor usage.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2275 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-21 04:49:33 +00:00
Jim Meyering
74a2fa1194
maint: remove trailing blanks
...
By running this command from a git-cloned directory:
git grep -z -l -E '[[:blank:]]+$' | xargs -0 perl -pi -e 's/[ \t]+$//'
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2266 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 11:34:50 +00:00
Jan Friesse
8b9812de8f
Handle LCR problem with unloading "unneeded" components
...
In LCR, global variable g_component_handle is used to keep handle of loaded
component. If this variable has magic value (0xFFFFFFFF) it means,
"we loaded library, but that library doesn't have any component_register
call -> don't try to destroy interfaces list).
If this variable has other value, it means "we loaded library, it registers,
but it exports some interface, what we currently don't need, so we can delete
that handle from libraries/interfaces list" and variable is set to magic value,
or "we loaded library, it registers and exports what we need -> great return some
nice value", but nobody resets variable to it's magic value.
Sadly, if you have loaded some component (needed), then try to load component,
which don't have component_register function, previously loaded component handle
is destroyed.
This problem happened to clm and quorum services, and cause, that loaded
clm handle was destroyed, so EVT (which need clm) just falls.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2234 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-12 10:20:53 +00:00
Steven Dake
f7328b7930
Remove unused variable on platforms other then Solaris.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2230 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-10 14:36:38 +00:00
Steven Dake
3d7f87779a
Add support for buildling on Solaris platforms.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2222 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:53:56 +00:00
Steven Dake
ae5895c3f7
Call initializer directly for broken platforms which don't honor ctors in the shared object on dlopen.
...
This could probably be more tidy to detect those OS platforms which don't do this instead of hardcoding
to a specific platform we intend to port to.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2221 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 07:47:10 +00:00
Jim Meyering
1f40a10983
don't include <signal.h> when it's not used
...
* exec/coroparse.c: Likewise.
* exec/quorum.c: Likewise.
* exec/sync.c: Likewise.
* exec/totemmrp.c: Likewise.
* exec/totemnet.c: Likewise.
* exec/totemrrp.c: Likewise.
* exec/totemsrp.c: Likewise.
* exec/vsf_quorum.c: Likewise.
* exec/vsf_ykd.c: Likewise.
* lcr/uic.c: Likewise.
* lcr/uis.c: Likewise.
* lib/cfg.c: Likewise.
* services/cfg.c: Likewise.
* services/cpg.c: Likewise.
* services/evs.c: Likewise.
* services/pload.c: Likewise.
* services/testquorum.c: Likewise.
* services/votequorum.c: Likewise.
* test/testconfdb.c: Likewise.
* test/testcpg.c: Likewise.
* test/testcpgzc.c: Likewise.
* test/testzcgc.c: Likewise.
* tools/corosync-cfgtool.c: Likewise.
* tools/corosync-objctl.c: Likewise.
* tools/corosync-pload.c: Likewise.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2193 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-05-18 16:41:46 +00:00
Jim Meyering
d86737ac9c
remove empty lines at end-of-file
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2118 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:04:06 +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
Jim Meyering
de3175bc69
remove useless if-before-free tests
...
* exec/coropoll.c (poll_destroy): Remove useless if.
* exec/main.c (main): Likewise.
* include/corosync/hdb.h (hdb_destroy): Likewise.
* lcr/lcr_ifact.c (scandir): Likewise.
* lib/sa-confdb.c (load_config): Likewise.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2106 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 07:28:18 +00:00
Steven Dake
9141188ee8
Add spin locks for critical sections in hdb api.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2050 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-10 02:24:01 +00:00
Steven Dake
870046d065
Patch to use snprintf where appropriate to avoid buffer overrun.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1990 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-02 18:49:24 +00:00
Jim Meyering
9bd1a8e728
declare many functions "static" (also avoids missing prototype warnings)
...
* exec/main.c (sigintr_handler, serialize_lock, serialize_unlock):
(serialize_lock, serialize_unlock):
* exec/sync.c (sync_start_init, sync_callbacks_load):
* exec/vsf_ykd.c (ykd_state_init):
* lcr/uis.c (cmd1):
* services/pload.c (send_message, token_callback, start_mcasting):
* tools/corosync-cfgtool.c (service_load_do, service_unload_do):
(shutdown_do, showaddrs_do, killnode_do, usage_do):
* tools/corosync-fplay.c (totemip_print, print_string_len):
(sync_printer_confchg_set_sync, sync_printer_set_sync_state):
(sync_printer_process_currentstate):
(sync_printer_process_get_shouldsync):
(sync_printer_checkpoint_release):
(sync_printer_checkpoint_transmit, sync_printer_section_transmit):
(sync_printer_checkpoint_receive, sync_printer_section_receive):
(sync_printer_nada, sync_printer_confchg_fn):
(printer_totemsrp_mcast, printer_totemsrp_delv):
(printer_totempg_mcast_fits, sync_printer_service_process):
* tools/corosync-objctl.c (get_child_name, get_parent_name):
(get_key):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1980 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:07 +00:00
Jim Meyering
1447cfd8e9
uis.c: don't infloop upon poll failure (e.g., ENOMEM)
...
* lcr/uis.c (lcr_uis_server): Return NULL for any poll failure
other than EINTR. This also avoids a warning.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1964 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:10 +00:00
Jim Meyering
44325473a3
uis.c: avoid warnings
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1927 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:11:00 +00:00
Jim Meyering
0206982964
avoid compiler warnings
...
* lcr/lcr_ifact.c (lcr_component_register): Remove decl of unused var.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1900 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:38:00 +00:00
Jim Meyering
4c90a7a218
avoid buffer overrun when there are more than 128 path entries
...
* lcr_ifact.c (PATH_LIST_SIZE): Define.
(path_list): Use it.
(ld_library_path_build): Don't store into path_list[path_list_entries]
if the counter is too large.
(ldso_path_build): Likewise.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1883 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-20 15:48:35 +00:00
Jim Meyering
4e1239b77e
don't store (and later deref) NULL upon strdup failure
...
* lcr_ifact.c (ld_library_path_build, ldso_path_build):
Handle strdup failure.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1882 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-20 15:48:27 +00:00
Steven Dake
4e5089cb5c
Revert last change which broke corosync.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1880 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-20 06:55:49 +00:00
Steven Dake
03a951e5e4
Reworked not to require stmt-after-decl support, plus another to fix a
...
bug that would arise when parsing more than 128 paths.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1879 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-20 00:01:18 +00:00
Steven Dake
d038f4c148
While looking at used of LCRSODIR, I saw an unchecked strdup.
...
That could lead to a NULL dereference.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1878 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 23:50:35 +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
06483f4900
Dont clobber stck on strings with length of zero.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1875 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 10:20:37 +00:00
Fabio M. Di Nitto
ae754092ca
- tidy up whitespaces
...
- try to keep everything < 80 cols
- stop installing testing lcrso
- fix soname= invokation
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1861 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-17 18:37:03 +00:00
Fabio M. Di Nitto
2feb8f959c
Add support for SOCKETDIR
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1856 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-17 10:46:19 +00:00
Fabio M. Di Nitto
e8f4a4c606
remove hardcoded /var and use localstatedir
...
instead.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1854 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-17 09:53:39 +00:00
Fabio M. Di Nitto
20e0336de5
configure.ac:
...
- Fix white space for --help.
- Drop LCRSODIR as global and move it to local directory.
all */Makefile.am:
- export -DDIRECTORY_NAME as required (for now only LCRSO and
SYSCONFDIR)
top level Makefile.am:
- drop hardcoded ETCDIR that is just wrong and use the configured one
*.c files around:
- drop hardcoded ETCDIR and use configured one.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1853 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-16 13:54:40 +00:00
Steven Dake
0c1eb7cb1d
Use hdb_handle_t for handle type in lcr_ifact.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1839 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 23:05:41 +00:00
Fabio M. Di Nitto
0e4f5a04c7
Fix more build/install glitches
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1837 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 11:33:19 +00:00
Fabio M. Di Nitto
00731ff68b
1) kill all those "for" shell loops. They are dangerous (as they don't
...
report install failures) and it's just overhead since $(INSTALL) can do
the same.
2) make sure to create our directories with $(INSTALL). Not sure I did
catch them all yet, but at least a good bunch. This also fix the
corosync.conf install error I introduced in the previous commit.
3) Handle SONAME automatically. This is the most intrusive change across
the board:
* configure.in now defines the system wide SOMAJOR, SOMINOR, SOMICRO
and SONAME and exports them to the Makefile.
* exec/Makefile.am, lib/Makefile.am are now updated to use those vars
rather than hardcoded version.
4) Bump the SOMAJOR to 3 as agreed since we did change both API and ABI.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1835 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 09:06:35 +00:00
Steven Dake
55ce38d64a
Remove const warnings from uic system.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1824 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 12:08:32 +00:00
Steven Dake
dabaa6463b
change some char * to const char * to match usage in system in lcr.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1823 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:57:21 +00:00
Steven Dake
eee43faeb4
Fix const qualifiers in lcr_ifact.c.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1822 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:53:43 +00:00
Steven Dake
0bc9cd90f6
Automake. The journey begins.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1798 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 08:35:41 +00:00
Steven Dake
58ab8d4a65
Unification around hdb_handle_t data type.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1782 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-02-25 11:14:47 +00:00
Christine Caulfield
bd646b6c39
This patch adds this capability for a limited number of totem keys using
...
the existing reload mechanism.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1709 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-12 11:27:27 +00:00
Christine Caulfield
4f1c8916b7
Install quorum.h file
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1708 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-12-11 09:42:17 +00:00
Angus Salkeld
17c0625160
LINT: fix "Assignment of ssize_t to int" warnings
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1696 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-11 18:13:47 +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
bb57c27e56
Add a top level "make lint"
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1684 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-11-01 08:19:18 +00:00
Steven Dake
01b8bc6ab2
Finish the renaming of openais to corosync in the tree.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1646 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 06:15:26 +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