Jim Meyering
1919ff31c7
cpg.c: resolve almost all warnings
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1917 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:09:38 +00:00
Jim Meyering
767e64ff4d
timer.c: don't infloop upon poll failure (e.g., ENOMEM)
...
* exec/timer.c (prioritized_timer_thread): Remove unreached
call to pthread_exit after infloop.
Return NULL for any poll failure other than EINTR.
Use "continue" rather than an equivalent "goto".
Return NULL upon failed pthread_setschedparam.
This also avoids a warning.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1916 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 16:33:39 +00:00
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
Fabio M. Di Nitto
0e718484f4
Fix pkgconfig generation
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1913 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 06:52:00 +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
Steven Dake
ada9153949
Change strcpy to sprintf to fix compile error.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1908 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 15:33:55 +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
0c9c22e085
avoid performing 'void *' arithmetic, and add a few const attributes
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1906 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 13:05:47 +00:00
Jim Meyering
100332447b
avoid 6 warnings
...
* services/votequorum.c (objdb_get_int): Make "key" const.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1905 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:39:00 +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
abd8e7c5cb
avoid 9 warnings
...
* test/logsysbench.c (bm_finish): Make parameter "const".
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1903 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:38:39 +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
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
11c2317936
avoid infloop upon out-of-memory or out-of-semaphores
...
* coroipc.c (cslib_service_connect): Upon shmget failure
loop only when errno == EEXIST. Any other error now translates
to res_setup.error.
Likewise for semget.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1899 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 10:05:43 +00:00
Fabio M. Di Nitto
5ad51031ba
Make confdb log level consistent with the other services
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1898 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 08:14:58 +00:00
Fabio M. Di Nitto
0d89fb27d4
Fix expansion order within the Makefile.am with the pleasent
...
effect to avoid to include .lcrso files in make dist target
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1895 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-23 21:58:58 +00:00
Jim Meyering
4efda59ff4
autogen.sh: prefer "automake" over automake-1.9
...
* autogen.sh: ...and don't accept ancient versions of automake.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1893 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-23 17:04:37 +00:00
Steven Dake
e59f78bdc4
Change dist to build corosync-trunk.tar.gz.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1891 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-23 14:42:38 +00:00
Fabio M. Di Nitto
1b80118a9c
Fix pkgconfig list of libraries we provide after ipc rework
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1890 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 18:44:33 +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
1a70ca7ae2
Change OPENAIS to COROSYNC in libversions definitions.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1888 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 15:38:05 +00:00
Steven Dake
32a64cd737
Change OPENAIS to COROSYNC in ipc ifdefs.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1887 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 15:37:48 +00:00
Steven Dake
0e70079b5c
Allow ipcc library to work on some arches which have different parameter
...
passing requirements for enums.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1886 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-22 15:31:40 +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
Steven Dake
f806dd09fd
This patch fixes a crash in cpg.c where a group is left befopre
...
cpg_finalise is called. It can cause the process_info structure to be
removed twice from the group list.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1884 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-21 11:25:48 +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
Jim Meyering
bfebf7da19
don't segfault upon failed strdup
...
* sa-confdb.c (load_config): Handle out-of-memory.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1881 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-20 15:48:19 +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
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
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
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
Steven Dake
6975136eb5
Updated TODO for corosync.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1873 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 09:56:39 +00:00
Fabio M. Di Nitto
539efd286e
Fix corosync.pc installation
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1872 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 07:54:55 +00:00
Fabio M. Di Nitto
c236cfa496
Add missing libs from pkgconfig generation
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1871 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 05:41:23 +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
Fabio M. Di Nitto
da0e99097f
Don't use EXTRA_DIST in install/uninstall
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1869 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-19 04:52:44 +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
Steven Dake
9e9fe9d3e5
Fix coroapi.h header errors.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1867 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-18 21:28:50 +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