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
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
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
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
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
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
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
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
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
fc1a08d411
Allow override of the LCRSO directory from the Makefiles or command line
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1458 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-27 09:14:02 +00:00
Steven Dake
37e4f0f59c
Fix reference counting in LCR code. Also fix problem with inability to compile
...
from the exec directory because PREFIX wasn't defined for lcr_ifact.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1451 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-15 20:48:31 +00:00
Steven Dake
d03f47ac6e
Calculate the default path based on the project value of PREFIX
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1444 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 07:00:53 +00:00
Steven Dake
2551a393c4
Provide information as to why a plugin refused to load
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1438 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:50:18 +00:00
Steven Dake
45823185e7
Missing stdlib.h from lcr_ifact.c.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1434 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-09-09 06:46:41 +00:00
Steven Dake
1c5bb34012
Patch to allow BSD/Linux systems to compile with latest Solaris porting patch.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1354 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-03-12 17:28:44 +00:00
Steven Dake
cb154572a2
Patch from Renaud to report some broken Solaris porting from past.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1353 fd59a12c-fef9-0310-b244-a6a79926bd2f
2007-03-06 16:18:44 +00:00
Fabien Thomas
b07e2dee27
remove invalid code / warnings detected by Intel compiler
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1308 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-11-16 17:34:44 +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
e6d3f3b1da
Cleanup comparisons in lcr_ifact and use strtok_r instead of junky parser.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1160 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-07-26 06:57:52 +00:00
Steven Dake
503d46f021
Fix error where pathlist buffer is overrun resulting in segfault
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1072 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-06-21 21:10:05 +00:00
Steven Dake
4a478b17ab
This patch does the following things:
...
* changes the default search path for lcrso files to /usr/libexec/lcrso
* checks the result of getcwd which can fail and return an error - in
that case handle the error appropriately
* changes a comment that was incorrectly stating only the cwd was being
searched for lcrso files
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1052 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-27 02:17:33 +00:00
Steven Dake
2eafd51e3d
Remove scandir error=%s printf since it spews a bunch of errors when the
...
aisexec is run after a make install
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1049 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-26 06:46:24 +00:00
Steven Dake
72d0145e03
Properly process the ld.so.conf file if it has includes.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1044 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-26 02:31:49 +00:00
Steven Dake
953a21eab8
commit for redundant ring take 4 was only done from exec directory missing all
...
of the commits for the rest of the directories. This commit will now allow the
tree to compile.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1035 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-21 23:11:42 +00:00
Steven Dake
835f16ba53
Patch to allow system to work if no ld.so.conf is present. ld.so.conf is
...
optional and may not be present on a system.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1031 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-19 19:40:40 +00:00
Patrick Caulfield
c7090b5047
Close ld.so.conf file descriptor when finished with it.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1027 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-05-17 07:34:09 +00:00
Fabien Thomas
f9ce4bea58
Remove warnings under Darwin
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1008 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-04-25 07:28:20 +00:00
Steven Dake
61922deab5
Fix scanning of LCRSOs not working on various systems
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1007 fd59a12c-fef9-0310-b244-a6a79926bd2f
2006-04-25 07:11:25 +00:00