Commit Graph

854 Commits

Author SHA1 Message Date
Jim Meyering
217c5bed8d logsys: detect write failure and avoid a file descriptor leak
* exec/logsys.c (logsys_log_rec_store): Close output file descriptor
and detect any failure.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1915 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 14:33:49 +00:00
Jim Meyering
dba6cd0859 totemconfig: avoid a file descriptor leak in the common case
* exec/totemconfig.c (read_keyfile): Don't leak a file descriptor.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1914 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 14:33:42 +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
Christine Caulfield
200fe649c7 Fix IPC when running on mac OS/X
Note that OS/X seems to be rather stingy about its IPC resources, so if things
crash you will probably have to clean up before starting it all again.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1911 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-25 15:54:31 +00:00
Christine Caulfield
73a3bd206f The IPC system smply concatenates SOCKETDIR with run/<socketname> so if
th euser forgets to add a trailing slash to the name: eg

./configure --with-socket-dir=/var/run

then the socket is created as /var/runcorosync.ipc

This patch adds the slash into the name generation printf.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1910 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-25 15:38:56 +00:00
Steven Dake
1b1c0b657a Appears to fix compile errors on macosx.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1909 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 16:03:46 +00:00
Jim Meyering
6a327f134b Do not perform arithmetic on "void*" pointers.
* exec/vsf_ykd.c (ykd_deliver_fn): Do not perform "void*" arithmetic.
* services/votequorum.c (quorum_deliver_fn): Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1907 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 13:05:55 +00:00
Jim Meyering
596e49cd7e avoid 8 warnings
* exec/totemconfig.c (objdb_get_string): Make "key" const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1904 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:38:52 +00:00
Jim Meyering
4dacba719a avoid 13 warnings
* exec/mainconfig.c (objdb_get_string): Make "key" const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1902 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:38:26 +00:00
Jim Meyering
7b0973f3bc avoid 22 warnings
* exec/totemconfig.c (objdb_get_int): Make "key" const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1901 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:38:13 +00:00
Fabio M. Di Nitto
aaf6948ae7 Fix 64bit alignment issue in totempg
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1889 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 18:35:06 +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
683ed1edde Remove some unnecessary serializer functions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1876 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 10:27:17 +00:00
Steven Dake
5eacc5df82 Don't clobber stack on strings with length of zero.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1874 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 10:20:19 +00:00
Fabio M. Di Nitto
bfdc2663c9 Fix logsys SONAME
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1870 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 05:21:17 +00:00
Steven Dake
4711f1e236 Serialize access to service engines.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1868 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-18 21:51:07 +00:00
Fabio M. Di Nitto
f335bd74aa Add missing uninstall-local targets and fix configuration intall target
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1866 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-18 10:17:50 +00:00
Fabio M. Di Nitto
6b59a57a0c More cleanup for distcheck to work
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1865 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-18 09:17:40 +00:00
Christine Caulfield
359fc86601 Add a dummy parameter to totemip_iface check so that it compiles on Darwin.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1864 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-18 08:37:10 +00:00
Fabio M. Di Nitto
cadfe03dd6 Fix more soname= at linking
Start fixing distcheck

White space cleanups


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1862 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-18 07:52:48 +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
Fabio M. Di Nitto
e8d5ae2510 Major configure.in/ac cleanup
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1849 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-16 11:01:50 +00:00
Fabio M. Di Nitto
3b6651b221 - remove --enable-static option as it is not required. This was a
leftover from gcc-2.x something time. corosync binary should always be
built dynamic.

- fix quorum_* target as it was missing the list of objects to be linked
in.. doh!

- fix object dependencies between TARGET, TARGET_OBJS and TARGET_SRC.
This also fixes the build/relink issues at install times that have been
noted before.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1847 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-13 08:26:56 +00:00
Steven Dake
1c098a5964 All integers received from objdb_get_int had invalid handle type.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1846 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-12 17:13:42 +00:00
Steven Dake
34583b8ef0 Use nocheck flagging on confchg iteration of handle ids.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1845 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-12 16:15:34 +00:00
Steven Dake
2b84d1075b Add handle checking to the hdb system.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1842 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 23:28:01 +00:00
Steven Dake
2a4c53dc1b Fix several errors in objdb notification handling, hdb_handle_t type
conversion errors, indentation, and do hdb_handle_put after instance 
data is used instead of before.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1841 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 23:09:04 +00:00
Steven Dake
072231129e Use hdb_handle_t for handle type in service.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1840 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 23:06:18 +00:00
Fabio M. Di Nitto
229c1837b5 Fix library linking
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1838 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 12:30:52 +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
Steven Dake
1c52564bbd Fix broken error check in commit 1818.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1836 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 11:27:20 +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
fbc4b57c28 Remove warnings from ipc.c
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1829 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-11 04:41:23 +00:00
Fabio M. Di Nitto
10fa45db6c Add dynamic timestamp on/off
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1827 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 13:18:11 +00:00
Steven Dake
bb87034524 Remove const warnings in crypto.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1826 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 12:22:55 +00:00
Steven Dake
43fa8a66c0 Remove qualifier errors in main.c
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1825 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 12:22:38 +00:00
Steven Dake
ce9768ffc5 Fix missing prototypes in totempg.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1821 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:45:00 +00:00
Steven Dake
f87bf5d029 Fix missing prototypes in totemmrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1820 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:42:10 +00:00
Steven Dake
eec866ea9e Fix missing prototypes and mismatched prototypes in totemmrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1819 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:40:12 +00:00
Steven Dake
5129befb9b Add missing hdb_handle_put in totemsrp and handle errors in mkdir and
chdir properly.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1818 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:30:34 +00:00
Steven Dake
9d1c727a82 Remove string literal warnings from totemsrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1817 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:23:57 +00:00
Steven Dake
a6b49dc40d Add missing prototypes in totemsrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1816 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:21:23 +00:00
Steven Dake
deb3f83255 Remove pointer math warnings from totemsrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1815 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:14:28 +00:00
Steven Dake
43ab4aa3a9 Define undefined prototypes
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1814 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:08:49 +00:00
Steven Dake
daeba96c58 Remove string literal warnings from totemrrp.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1813 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 11:04:12 +00:00
Steven Dake
6895160788 Remove const warnings from main.c.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1812 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-10 10:35:14 +00:00