Commit Graph

894 Commits

Author SHA1 Message Date
Steven Dake
162c7cd8bc Patch to document uid/gid and to default to allowing ais user to access
services of corosync.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1988 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 17:39:18 +00:00
Fabio M. Di Nitto
84f5c3b6ff add fileline/function_name support in corosync
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1987 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 13:24:20 +00:00
Fabio M. Di Nitto
9e2fa013c2 Fix last build warning in mainconfig.
Add a missing const.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1986 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 12:54:20 +00:00
Jim Meyering
3965e378e6 avoid prototype warnings
* test/evsbench.c: Declare functions/vars static.
* test/evsverify.c: Likewise.
* test/testcpg2.c: Likewise.
* test/testcpg.c: Likewise.
* test/logsysbench.c: Likewise.
* test/cpgbench.c: Likewise.
* exec/sync.c: Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1982 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:33:23 +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
7a6e1784fd * exec/apidef.c: Include "apidef.h".
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1979 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:32:48 +00:00
Jim Meyering
59718fb62a timer.c: connect with its published prototypes
* exec/timer.c: Include "timer.h".
* exec/timer.h (corosync_timer_init): Make return type in prototype
match the one in the function definition.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1978 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:32:40 +00:00
Jim Meyering
51cad562ae add "void" parameter list to avoid "isn't prototype" warning
* exec/objdb.c (objdb_wrlock, objdb_rdlock, objdb_rdunlock):
(objdb_wrunlock):
* services/cfg.c (send_shutdown, check_shutdown_status):
* services/votequorum.c (send_expectedvotes_notification):
* tools/corosync-cfgtool.c (shutdown_do):

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1977 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:32:32 +00:00
Fabio M. Di Nitto
2a5bd53771 Fix internal API usage and add support for file_name
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1976 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 09:01:52 +00:00
Fabio M. Di Nitto
e770695cd0 Fix build warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1975 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-01 05:48:03 +00:00
Jim Meyering
a660341656 totemip.c: avoid 1 warning
* exec/totemip.c (totemip_print): Add const.
* include/corosync/totem/totemip.h: Ditto.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1974 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:18:29 +00:00
Jim Meyering
d7492c55da apidef.c: avoid 1 warning
* exec/apidef.c (_corosync_public_exit_error): Mark as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1970 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:56 +00:00
Jim Meyering
66325f4d56 main.h: avoid 1 warning
* exec/main.c (corosync_exit): Mark as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1969 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:49 +00:00
Jim Meyering
588dd0b16d logsys.c: avoid 1 warning
* exec/logsys.c (logsys_conf): Add const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1968 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:42 +00:00
Jim Meyering
ff701e7c32 util.h: avoid 2 warnings
* exec/util.h (_corosync_out_of_memory_error): Mark as "noreturn".
(_corosync_exit_error): Likewise.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1967 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:34 +00:00
Jim Meyering
7b73cfe841 logsys.c: avoid 1 warning
* exec/logsys.c (logsys_worker_thread): Mark function as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1966 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:27 +00:00
Jim Meyering
9b29d93bba wthread.c: avoid 1 warning
* exec/wthread.c (worker_thread): Mark function as "noreturn".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1965 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:17:19 +00:00
Jim Meyering
dcc1333ba9 mainconfig.c: avoid 2 warnings
* exec/mainconfig.c (uid_determine, gid_determine): Add const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1962 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:16:52 +00:00
Jim Meyering
8bc74e52db service.c: avoid 5 warnings
* exec/service.c (struct default_service): Make "name" const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1961 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:16:44 +00:00
Jim Meyering
8daf7ceabb main.c: avoid a few warnings FIXME: merge with another?
* exec/main.c (ipc_log_printf): Add const.
(main): tweak config_iface handling

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1959 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:16:24 +00:00
Jim Meyering
23c64c6413 coroparse.c: add const: avoid 2 warnings
* exec/coroparse.c: Add const.  Tweak s/fp==0/fp==NULL/

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1956 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:15:57 +00:00
Jim Meyering
d04418df5c coroipcs.h: avoid 3 warnings
* exec/coroipcs.h: Forward-declare "struct iovec".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1948 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:14:41 +00:00
Jim Meyering
1280f900cb logsys.c: fix two more warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1945 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:14:08 +00:00
Jim Meyering
cc6eed7042 in progress: avoid warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1943 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:13:47 +00:00
Jim Meyering
3baa7fa9ce avoid 7 warnings
(struct sync_callbacks), (struct corosync_service_engine) [name]:
Make member const.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1939 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:13:02 +00:00
Jim Meyering
8bcbde3c08 totem*: add "const" to avoid 3 more warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1937 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:12:31 +00:00
Jim Meyering
3ec95b158b totem*: add "const" to avoid 1 more warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1936 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:12:19 +00:00
Jim Meyering
f7152d349a totem*: add "const" to avoid 1 more warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1935 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:12:11 +00:00
Jim Meyering
9613fe0944 totemconfig.c: avoid another warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1933 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:11:55 +00:00
Jim Meyering
88a407f40a * exec/totemconfig.c: eliminate 8 const-related warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1932 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:11:46 +00:00
Jim Meyering
87b6a141ff * exec/objdb.c (object_create): make "object_name" param const
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1930 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:11:25 +00:00
Jim Meyering
b107445d5a objdb.c, etc: add "const" to avoid warnings
* exec/objdb.c:
* include/corosync/engine/coroapi.h:
* include/corosync/engine/objdb.h:

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1928 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:11:09 +00:00
Jim Meyering
7c2ddcbe40 service.[ch]: remove 7 const-related warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1925 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:45 +00:00
Jim Meyering
f42de14a5a coroipcs.[ch]: remove 4 const-related warnings
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1924 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:37 +00:00
Jim Meyering
921a5a8417 totempg.c: remove one const-related warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1923 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:30 +00:00
Jim Meyering
b94d4f6ae4 totempg.c: remove one const-related warning
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1921 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:10:13 +00:00
Jim Meyering
e487affc01 logsys_config_facility_set: make "name" parameter const
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1919 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:09:56 +00:00
Jim Meyering
2344e2f1b8 cfg.c: nearly warning-free
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1918 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-30 21:09:47 +00:00
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
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