diff --git a/Doxyfile b/Doxyfile index ee53bae1..d9e25ceb 100644 --- a/Doxyfile +++ b/Doxyfile @@ -16,7 +16,7 @@ BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ALWAYS_DETAILED_SEC = NO FULL_PATH_NAMES = NO -STRIP_FROM_PATH = +STRIP_FROM_PATH = INTERNAL_DOCS = NO STRIP_CODE_COMMENTS = YES CASE_SENSE_NAMES = YES @@ -33,8 +33,8 @@ TAB_SIZE = 8 GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES -ALIASES = -ENABLED_SECTIONS = +ALIASES = +ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 OPTIMIZE_OUTPUT_FOR_C = YES SHOW_USED_FILES = YES @@ -44,19 +44,19 @@ SHOW_USED_FILES = YES QUIET = YES WARNINGS = YES WARN_IF_UNDOCUMENTED = NO -WARN_FORMAT = -WARN_LOGFILE = +WARN_FORMAT = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = lib include exec FILE_PATTERNS = *.c *.h RECURSIVE = YES -EXAMPLE_PATH = -EXAMPLE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = +IMAGE_PATH = +INPUT_FILTER = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing @@ -70,15 +70,15 @@ REFERENCES_RELATION = YES #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES -HTML_OUTPUT = -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = +HTML_OUTPUT = +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO GENERATE_CHI = NO @@ -92,11 +92,11 @@ TREEVIEW_WIDTH = 250 # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO -LATEX_OUTPUT = +LATEX_OUTPUT = COMPACT_LATEX = NO PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = +EXTRA_PACKAGES = +LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO @@ -104,11 +104,11 @@ LATEX_BATCHMODE = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO -RTF_OUTPUT = +RTF_OUTPUT = COMPACT_RTF = NO RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- @@ -121,7 +121,7 @@ MAN_LINKS = YES #--------------------------------------------------------------------------- GENERATE_XML = NO #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES @@ -131,17 +131,17 @@ INCLUDE_PATH = include INCLUDE_FILE_PATTERNS = *.h PREDEFINED = "COROSYNC_BEGIN_DECLS=" \ "COROSYNC_END_DECLS=" \ - "DOXYGEN_SHOULD_SKIP_THIS" + "DOXYGEN_SHOULD_SKIP_THIS" SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to external references +# Configuration::addtions related to external references #--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = +TAGFILES = +GENERATE_TAGFILE = ALLEXTERNALS = NO -PERL_PATH = +PERL_PATH = #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES HAVE_DOT = NO @@ -152,13 +152,13 @@ HIDE_UNDOC_RELATIONS = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES GRAPHICAL_HIERARCHY = YES -DOT_PATH = -DOTFILE_DIRS = +DOT_PATH = +DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 640 MAX_DOT_GRAPH_HEIGHT = 1024 GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine +# Configuration::addtions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO diff --git a/LICENSE b/LICENSE index e30734f4..e0a0680f 100644 --- a/LICENSE +++ b/LICENSE @@ -7,7 +7,7 @@ available source code, may be exported from the United States under License Exception TSU prsuant to 15 C.F.R Section 740.13(e). *** ----------------------------------------------------------------------------- -The following license applies to every file in this package except for +The following license applies to every file in this package except for the files exec/crypto.c and exec/crypto.h. The license for these files is described later in this document. Some files are contributed by other authors and hence not copyright MontaVista Software. In this case, the license is diff --git a/Makefile.am b/Makefile.am index bb205196..5c93d2a0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,13 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/README.devmap b/README.devmap index 32fd4d97..2300c38d 100644 --- a/README.devmap +++ b/README.devmap @@ -405,7 +405,7 @@ are provided: * get a reference to a handle instance * release a reference to a handle instance -When a library connects, it sends via a message, the service type. The +When a library connects, it sends via a message, the service type. The service type is stored and used later to reference the message handlers for both the library message handlers and executive message handlers. Every message sent contains an integer identifier, which is used to index @@ -427,7 +427,7 @@ virtual synchrony model. The group messaging interface also delivers the message according to the extended virtual synchrony model. This has several advantages which are described in the virtual synchrony section. One advantage that must be described now is that messages are self-delivered; -if a node sends a message, that same message is delivered back to that +if a node sends a message, that same message is delivered back to that node. When the executive message is delivered, it is processed by the executive @@ -509,7 +509,7 @@ Certain guarantees are required by virtual synchrony. If a message is sent, it must be delivered by every processor unless that processor fails. If a particular processor fails, a configuration change occurs creating a new configuration under which a new set of decisions may be made. This implies -that even unreliable networks must reliably deliver messages. The +that even unreliable networks must reliably deliver messages. The mplementation in corosync works on unreliable as well as reliable networks. Every message sent must be delivered, unless a configuration change occurs. @@ -788,7 +788,7 @@ enum service_types { These are the request CLM message identifiers: -Each library should have an ipc_APINAME.h file in include. It should define +Each library should have an ipc_APINAME.h file in include. It should define request types and response types. enum req_clm_types { @@ -845,7 +845,7 @@ struct req_clm_trackstart { SaUint32T numberOfItems; }; -The saClmClusterTrackStart api should create this message and send it to the +The saClmClusterTrackStart api should create this message and send it to the executive. responses should be of: @@ -855,12 +855,12 @@ struct res_clm_trackstart ------------ some notes ------------ -* Avoid doing anything tricky in the library itself. Let the executive +* Avoid doing anything tricky in the library itself. Let the executive handler do all of the work of the system. minimize what the API does. * Once an api is developed, it must be added to the makefile. Just add a line for the file to EXECOBJS build line. * protect I/O send/recv with a mutex. -* always look at other libraries when there is a question about how to +* always look at other libraries when there is a question about how to do something. It has likely been thought out in another library. ------------------------------------------------------------------------------- @@ -998,7 +998,7 @@ used in the handler function. ------------------------------------------------ The service handler needs some special magic to dynamically be linked into -corosync. +corosync. /* * Dynamic loader definition @@ -1047,7 +1047,7 @@ creating an external plugin, there are configuration parameters which may be used to add your plugin into the corosync scanning of plugins. --------------------------------- - Connection specific information + Connection specific information --------------------------------- Every connection may have specific connection information if private data is greater then zero for the service handler. This is used to allow each @@ -1194,7 +1194,7 @@ so expect it in the code. ---------------- the confchg_fn ---------------- -This function is called whenever a configuration change occurs. Some +This function is called whenever a configuration change occurs. Some services may not need this function, while others may. This is a good way to sync up joining nodes with the current state of the information stored on a particular processor. @@ -1206,7 +1206,7 @@ GDB is your friend, especially the "where" command. But it stops execution. This has a nasty side effect of killing the current configuration. In this case GDB may become your enemy. -printf is your friend when GDB is your enemy. +printf is your friend when GDB is your enemy. If stuck, ask on the mailing list, send your patches. Alot of time has been spent designing corosync, and even more time debugging it. There are people diff --git a/README.recovery b/README.recovery index ceac6528..42397e81 100644 --- a/README.recovery +++ b/README.recovery @@ -91,7 +91,7 @@ pseudocode executed on event receipt of checkpoint update else create checkpoint reset checkpoint refcount array - + pseudocode executed on event receipt of checkpoint section update if checkpoint section exists in temporary storage ignore message diff --git a/SECURITY b/SECURITY index 4b04094c..d1abc0c0 100644 --- a/SECURITY +++ b/SECURITY @@ -45,7 +45,7 @@ Group Messaging Interface Group messaging uses UDP/IP to communicate with other corosync executives using messages. It is possible without authentication of every packet that an attacker could forge messages. These forged messages could fault the corosync -executive distributed state machines. It would also be possible to corrupt +executive distributed state machines. It would also be possible to corrupt end applications by forging changes. Since messages are sent using UDP/IP it would be possible to snoop those @@ -62,7 +62,7 @@ wants to receive a message from the network, it uses authenticate_and_decrypt to verify the message is valid and decrypt it. These two functions utilize the following algorithms: -sha1 - hash algorithm secure for using with hmac +sha1 - hash algorithm secure for using with hmac hmac - produces a 16 byte digest from any length input sober - pseudo random number generator and stream cipher @@ -76,7 +76,7 @@ sober algorithm to generate the three required keys. Every message starts with a struct security { unsigned char digest[20]; A one way hash digest - unsigned char salt[16]; A securely generated random number + unsigned char salt[16]; A securely generated random number } When a message is sent (encrypt_and_sign): @@ -96,7 +96,7 @@ When a message is sent (encrypt_and_sign): 7. The message, except for the security header, is hmaced to produce a digest using the sha1 algorithm. 8. The digest is stored in the outgoing message. -9. The message is transmitted. +9. The message is transmitted. When a message is received (decrypt_and_authenticate): diff --git a/autogen.sh b/autogen.sh index c1b7181c..27a60724 100755 --- a/autogen.sh +++ b/autogen.sh @@ -25,17 +25,17 @@ testProgram() fi # The GNU standard is --version - if + if $cmd --version /dev/null 2>&1 then - return 0 + return 0 fi # Maybe it suppports -V instead - if + if $cmd -V /dev/null 2>&1 then - return 0 + return 0 fi # Nope, the program seems broken @@ -61,7 +61,7 @@ RC=0 gnu="ftp://ftp.gnu.org/pub/gnu" # Check for Autoconf -for command in autoconf autoconf213 autoconf253 autoconf259 +for command in autoconf autoconf213 autoconf253 autoconf259 do if testProgram $command == 1 @@ -79,7 +79,7 @@ done # Check for automake for command in automake19 automake-1.9 automake do - if + if testProgram $command then automake=$command @@ -88,13 +88,13 @@ do fi done -if [ -z $autoconf ]; then +if [ -z $autoconf ]; then echo You must have autoconf installed to compile the corosync package. echo Download the appropriate package for your system, echo or get the source tarball at: $gnu/autoconf/ exit 1 -elif [ -z $automake ]; then +elif [ -z $automake ]; then echo You must have automake installed to compile the corosync package. echo Download the appropriate package for your system, echo or get the source tarball at: $gnu/automake/ @@ -108,7 +108,7 @@ ln -s `which $automake` ./automake ln -s `which $autoheader` ./autoheader printf "$autoconf:\t" -$autoconf --version | head -n 1 +$autoconf --version | head -n 1 printf "$automake:\t" $automake --version | head -n 1 diff --git a/exec/Makefile.am b/exec/Makefile.am index 61e0c153..eec9ffe2 100644 --- a/exec/Makefile.am +++ b/exec/Makefile.am @@ -1,13 +1,13 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/exec/coroipcs.c b/exec/coroipcs.c index 10e158b5..228de3b9 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -166,7 +166,7 @@ memory_map ( void *addr_orig; void *addr; int res; - + fd = open (path, O_RDWR, 0600); unlink (path); @@ -175,18 +175,18 @@ memory_map ( addr_orig = mmap (NULL, bytes, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - + if (addr_orig == MAP_FAILED) { return (-1); } - + addr = mmap (addr_orig, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); - + if (addr != addr_orig) { return (-1); } - + res = close (fd); if (res) { return (-1); @@ -205,7 +205,7 @@ circular_memory_map ( void *addr_orig; void *addr; int res; - + fd = open (path, O_RDWR, 0600); unlink (path); @@ -214,22 +214,22 @@ circular_memory_map ( addr_orig = mmap (NULL, bytes << 1, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - + if (addr_orig == MAP_FAILED) { return (-1); } - + addr = mmap (addr_orig, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); - + if (addr != addr_orig) { return (-1); } - + addr = mmap (((char *)addr_orig) + bytes, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); - + res = close (fd); if (res) { return (-1); @@ -453,7 +453,7 @@ static void *serveraddr2void (uint64_t server_addr) u.server_addr = server_addr; return (u.server_ptr); -}; +}; static inline void zerocopy_operations_process ( struct conn_info *conn_info, @@ -479,11 +479,11 @@ static inline void zerocopy_operations_process ( res_header.size = sizeof (mar_res_header_t); res_header.id = 0; coroipcs_response_send ( - conn_info, &res_header, + conn_info, &res_header, res_header.size); *new_message = 0; return; - } else + } else if (header->id == ZC_FREE_HEADER) { mar_req_coroipcc_zc_free_t *hdr = (mar_req_coroipcc_zc_free_t *)header; mar_res_header_t res_header; @@ -496,15 +496,15 @@ static inline void zerocopy_operations_process ( res_header.size = sizeof (mar_res_header_t); res_header.id = 0; coroipcs_response_send ( - conn_info, &res_header, + conn_info, &res_header, res_header.size); *new_message = 0; return; - } else + } else if (header->id == ZC_EXECUTE_HEADER) { mar_req_coroipcc_zc_execute_t *hdr = (mar_req_coroipcc_zc_execute_t *)header; - + header = (mar_req_header_t *)(((char *)serveraddr2void(hdr->server_address) + sizeof (struct coroipcs_zc_header))); } *header_out = header; @@ -558,9 +558,9 @@ retry_semop: send_ok = api->sending_allowed (conn_info->service, header->id, - header, + header, conn_info->sending_allowed_private_data); - + if (send_ok) { api->serialize_lock(); api->handler_fn_get (conn_info->service, header->id) (conn_info, header); @@ -574,7 +574,7 @@ retry_semop: res_overlay.header.id = api->response_id_get (conn_info->service, header->id); res_overlay.header.error = CS_ERR_TRY_AGAIN; - coroipcs_response_send (conn_info, &res_overlay, + coroipcs_response_send (conn_info, &res_overlay, res_overlay.header.size); } @@ -634,7 +634,7 @@ req_setup_recv ( msg_recv.msg_flags = 0; uid_t euid; gid_t egid; - + euid = -1; egid = -1; if (getpeereid(conn_info->fd, &euid, &egid) != -1 && @@ -848,7 +848,7 @@ void coroipcs_ipc_exit (void) conn_info->dispatch_size); semctl (conn_info->semid, 0, IPC_RMID); - + pthread_kill (conn_info->thread, SIGUSR1); } } @@ -1290,7 +1290,7 @@ int coroipcs_handler_dispatch ( /* * ipc thread is the only reference at startup */ - conn_info->refcount = 1; + conn_info->refcount = 1; conn_info->state = CONN_STATE_THREAD_ACTIVE; conn_info->private_data = api->malloc (api->private_data_size_get (conn_info->service)); diff --git a/exec/coropoll.c b/exec/coropoll.c index fc94faca..50a3a2d8 100644 --- a/exec/coropoll.c +++ b/exec/coropoll.c @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -81,7 +81,7 @@ hdb_handle_t poll_create (void) if (res != 0) { goto error_destroy; } - + poll_instance->poll_entries = 0; poll_instance->ufds = 0; poll_instance->poll_entry_count = 0; @@ -92,7 +92,7 @@ hdb_handle_t poll_create (void) error_destroy: hdb_handle_destroy (&poll_instance_database, handle); - + error_exit: return (-1); } @@ -164,7 +164,7 @@ int poll_dispatch_add ( goto error_put; } poll_instance->poll_entries = poll_entries; - + ufds = (struct pollfd *)realloc (poll_instance->ufds, (poll_instance->poll_entry_count + 1) * sizeof (struct pollfd)); @@ -177,7 +177,7 @@ int poll_dispatch_add ( poll_instance->poll_entry_count += 1; install_pos = poll_instance->poll_entry_count - 1; } - + /* * Install new dispatch handler */ @@ -222,7 +222,7 @@ int poll_dispatch_modify ( if (poll_instance->poll_entries[i].ufd.fd == fd) { poll_instance->poll_entries[i].ufd.events = events; poll_instance->poll_entries[i].dispatch_fn = dispatch_fn; - + goto error_put; } } @@ -336,7 +336,7 @@ int poll_stop ( res = -ENOENT; goto error_exit; } - + poll_instance->stop_requested = 1; hdb_handle_put (&poll_instance_database, handle); @@ -391,7 +391,7 @@ retry_poll: poll_instance->ufds[i].revents) { res = poll_instance->poll_entries[i].dispatch_fn (handle, - poll_instance->ufds[i].fd, + poll_instance->ufds[i].fd, poll_instance->ufds[i].revents, poll_instance->poll_entries[i].data); @@ -434,5 +434,5 @@ void poll_print_state ( } } } - + #endif diff --git a/exec/crypto.c b/exec/crypto.c index 61c8164d..a66a1c7d 100644 --- a/exec/crypto.c +++ b/exec/crypto.c @@ -130,7 +130,7 @@ typedef uint64_t ulong64; (((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \ (((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); } -#ifdef ENDIAN_32BITWORD +#ifdef ENDIAN_32BITWORD #define STORE32L(x, y) \ { unsigned long __t = (x); memcpy(y, &__t, 4); } @@ -191,7 +191,7 @@ typedef uint64_t ulong64; (((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16) | \ (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } -#ifdef ENDIAN_32BITWORD +#ifdef ENDIAN_32BITWORD #define STORE32H(x, y) \ { unsigned long __t = (x); memcpy(y, &__t, 4); } @@ -384,7 +384,7 @@ int func_name (hash_state * md, const unsigned char *buf, unsigned long len) (((ulong64)((y)[4] & 255))<<24)|(((ulong64)((y)[5] & 255))<<16) | \ (((ulong64)((y)[6] & 255))<<8)|(((ulong64)((y)[7] & 255))); } -#ifdef ENDIAN_32BITWORD +#ifdef ENDIAN_32BITWORD #define STORE32L(x, y) \ { unsigned long __t = (x); memcpy(y, &__t, 4); } @@ -445,7 +445,7 @@ int func_name (hash_state * md, const unsigned char *buf, unsigned long len) (((ulong64)((y)[3] & 255))<<24)|(((ulong64)((y)[2] & 255))<<16) | \ (((ulong64)((y)[1] & 255))<<8)|(((ulong64)((y)[0] & 255))); } -#ifdef ENDIAN_32BITWORD +#ifdef ENDIAN_32BITWORD #define STORE32H(x, y) \ { unsigned long __t = (x); memcpy(y, &__t, 4); } @@ -583,7 +583,7 @@ static const ulong32 Multab[256] = { * "On the Design of 8*32 S-boxes". Unpublished report, by the * Information Systems Research Centre, * Queensland University of Technology, 1999. - * + * * The most significant 8 bits are the Skipjack "F table", which can be * found at http://csrc.nist.gov/CryptoToolkit/skipjack/skipjack.pdf . * In this optimised table, though, the intent is to XOR the word from @@ -663,7 +663,7 @@ static const ulong32 Sbox[256] = { * Based on s128fast.c reference code supplied by Greg Rose of QUALCOMM. */ -const struct _prng_descriptor sober128_desc = +const struct _prng_descriptor sober128_desc = { "sober128", 64, &sober128_start, @@ -752,7 +752,7 @@ int sober128_start(prng_state *prng) struct sober128_prng *c; c = &(prng->sober128); - + /* Register initialised to Fibonacci numbers */ c->R[0] = 1; c->R[1] = 1; @@ -811,7 +811,7 @@ static void s128_genkonst(struct sober128_prng *c) c->R[FOLDP] ^= (nl); /* nonlinear diffusion of register for key */ -#define DROUND(z) STEP(c->R,z); NLFUNC(c,(z+1)); c->R[OFF((z+1),FOLDP)] ^= t; +#define DROUND(z) STEP(c->R,z); NLFUNC(c,(z+1)); c->R[OFF((z+1),FOLDP)] ^= t; static void s128_diffuse(struct sober128_prng *c) { ulong32 t; @@ -846,7 +846,7 @@ int sober128_add_entropy(const unsigned char *buf, unsigned long len, prng_state /* this is the first call to the add_entropy so this input is the key */ /* len must be multiple of 4 bytes */ assert ((len & 3) == 0); - + for (i = 0; i < len; i += 4) { k = BYTE2WORD(&buf[i]); ADDKEY(k); @@ -863,7 +863,7 @@ int sober128_add_entropy(const unsigned char *buf, unsigned long len, prng_state s128_genkonst(c); s128_savestate(c); c->nbuf = 0; - c->flag = 0; + c->flag = 0; c->set = 1; } else { /* ok we are adding an IV then... */ @@ -871,7 +871,7 @@ int sober128_add_entropy(const unsigned char *buf, unsigned long len, prng_state /* len must be multiple of 4 bytes */ assert ((len & 3) == 0); - + for (i = 0; i < len; i += 4) { k = BYTE2WORD(&buf[i]); ADDKEY(k); @@ -907,7 +907,7 @@ unsigned long sober128_read(unsigned char *buf, unsigned long nbytes, prng_state c = &(prng->sober128); t = 0; tlen = nbytes; - + /* handle any previously buffered bytes */ while (c->nbuf != 0 && nbytes != 0) { *buf++ ^= c->sbuf & 0xFF; @@ -976,7 +976,7 @@ const struct _hash_descriptor sha1_desc = 64, /* DER identifier */ - { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E, + { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14 }, 15, @@ -1008,7 +1008,7 @@ static void sha1_compress(hash_state *md, const unsigned char *buf) /* expand it */ for (i = 16; i < 80; i++) { - W[i] = ROL(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1); + W[i] = ROL(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1); } /* compress */ @@ -1017,7 +1017,7 @@ static void sha1_compress(hash_state *md, const unsigned char *buf) #define FF1(a,b,c,d,e,i) e = (ROL(a, 5) + F1(b,c,d) + e + W[i] + 0x6ed9eba1UL); b = ROL(b, 30); #define FF2(a,b,c,d,e,i) e = (ROL(a, 5) + F2(b,c,d) + e + W[i] + 0x8f1bbcdcUL); b = ROL(b, 30); #define FF3(a,b,c,d,e,i) e = (ROL(a, 5) + F3(b,c,d) + e + W[i] + 0xca62c1d6UL); b = ROL(b, 30); - + for (i = 0; i < 20; ) { FF0(a,b,c,d,e,i++); FF0(e,a,b,c,d,i++); @@ -1027,7 +1027,7 @@ static void sha1_compress(hash_state *md, const unsigned char *buf) } /* round two */ - for (; i < 40; ) { + for (; i < 40; ) { FF1(a,b,c,d,e,i++); FF1(e,a,b,c,d,i++); FF1(d,e,a,b,c,i++); @@ -1036,7 +1036,7 @@ static void sha1_compress(hash_state *md, const unsigned char *buf) } /* round three */ - for (; i < 60; ) { + for (; i < 60; ) { FF2(a,b,c,d,e,i++); FF2(e,a,b,c,d,i++); FF2(d,e,a,b,c,i++); @@ -1045,7 +1045,7 @@ static void sha1_compress(hash_state *md, const unsigned char *buf) } /* round four */ - for (; i < 80; ) { + for (; i < 80; ) { FF3(a,b,c,d,e,i++); FF3(e,a,b,c,d,i++); FF3(d,e,a,b,c,i++); @@ -1086,7 +1086,7 @@ int sha1_done(hash_state * md, unsigned char *hash) /* * Assert there isn't an invalid argument */ - assert (md->sha1.curlen < sizeof (md->sha1.buf)); + assert (md->sha1.curlen < sizeof (md->sha1.buf)); /* increase the length of the message */ md->sha1.length += md->sha1.curlen * 8; @@ -1169,7 +1169,7 @@ int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned lon hash_descriptor[hash]->init(&hmac->md); err = hash_descriptor[hash]->process(&hmac->md, buf, hash_descriptor[hash]->blocksize); - return err; + return err; } int hmac_process(hmac_state *hmac, const unsigned char *buf, unsigned long len) @@ -1231,7 +1231,7 @@ int hmac_done(hmac_state *hmac, unsigned char *hashOut, unsigned long *outlen) goto __ERR; } - // copy to output + // copy to output for (i = 0; i < hashsize && i < *outlen; i++) { hashOut[i] = buf[i]; } @@ -1250,14 +1250,14 @@ const struct _hash_descriptor *hash_descriptor[] = /* portable way to get secure random bits to feed a PRNG */ /* on *NIX read /dev/random */ -static unsigned long rng_nix(unsigned char *buf, unsigned long len, +static unsigned long rng_nix(unsigned char *buf, unsigned long len, void (*callback)(void)) { int fd; unsigned long rb; fd = open ("/dev/urandom", O_RDONLY); - + rb = (unsigned long)read (fd, buf, len); close (fd); @@ -1270,7 +1270,7 @@ static unsigned long rng_nix(unsigned char *buf, unsigned long len, #define ANSI_RNG -static unsigned long rng_ansic(unsigned char *buf, unsigned long len, +static unsigned long rng_ansic(unsigned char *buf, unsigned long len, void (*callback)(void)) { clock_t t1; @@ -1292,7 +1292,7 @@ static unsigned long rng_ansic(unsigned char *buf, unsigned long len, } while (a == b); acc = (acc << 1) | a; } - *buf++ = acc; + *buf++ = acc; acc = 0; bits = 8; } @@ -1300,9 +1300,9 @@ static unsigned long rng_ansic(unsigned char *buf, unsigned long len, return l; } -#endif +#endif -unsigned long rng_get_bytes(unsigned char *buf, unsigned long len, +unsigned long rng_get_bytes(unsigned char *buf, unsigned long len, void (*callback)(void)) { unsigned long x; @@ -1314,12 +1314,12 @@ unsigned long rng_get_bytes(unsigned char *buf, unsigned long len, return 0; } -int rng_make_prng(int bits, int wprng, prng_state *prng, +int rng_make_prng(int bits, int wprng, prng_state *prng, void (*callback)(void)) { unsigned char buf[256]; int err; - + if (bits < 64 || bits > 1024) { return CRYPT_INVALID_PRNGSIZE; } diff --git a/exec/crypto.h b/exec/crypto.h index 427dc16a..a154ff76 100644 --- a/exec/crypto.h +++ b/exec/crypto.h @@ -86,19 +86,19 @@ int hmac_process(hmac_state *hmac, const unsigned char *buf, unsigned long len); int hmac_done(hmac_state *hmac, unsigned char *hashOut, unsigned long *outlen); int hmac_test(void); int hmac_memory(int hash, const unsigned char *key, unsigned long keylen, - const unsigned char *data, unsigned long len, + const unsigned char *data, unsigned long len, unsigned char *dst, unsigned long *dstlen); struct sober128_prng { uint32_t R[17], /* Working storage for the shift register */ - initR[17], /* saved register contents */ + initR[17], /* saved register contents */ konst, /* key dependent constant */ sbuf; /* partial word encryption buffer */ int nbuf, /* number of part-word stream bits buffered */ flag, /* first add_entropy call or not? */ set; /* did we call add_entropy to set key? */ - + }; typedef union Prng_state { @@ -125,8 +125,8 @@ int sober128_export(unsigned char *out, unsigned long *outlen, prng_state *prng) int sober128_import(const unsigned char *in, unsigned long inlen, prng_state *prng); int sober128_test(void); -unsigned long rng_get_bytes(unsigned char *buf, - unsigned long len, +unsigned long rng_get_bytes(unsigned char *buf, + unsigned long len, void (*callback)(void)); int rng_make_prng(int bits, int wprng, prng_state *prng, void (*callback)(void)); diff --git a/exec/logsys.c b/exec/logsys.c index 30b65986..613574d0 100644 --- a/exec/logsys.c +++ b/exec/logsys.c @@ -9,7 +9,7 @@ * All rights reserved. * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -245,8 +245,8 @@ static inline void records_reclaim (unsigned int idx, unsigned int words) words_needed -= flt_data[flt_data[FDTAIL_INDEX]]; old_tail = flt_data[FDTAIL_INDEX]; - flt_data[FDTAIL_INDEX] = - (flt_data[FDTAIL_INDEX] + + flt_data[FDTAIL_INDEX] = + (flt_data[FDTAIL_INDEX] + flt_data[flt_data[FDTAIL_INDEX]]) % (flt_data_size); if (log_rec_idx == old_tail) { log_requests_lost += 1; @@ -301,7 +301,7 @@ static inline int strcpy_cutoff (char *dest, const char *src, int cutoff) * %p PRIORITY * %t TIMESTAMP * %b BUFFER - * + * * any number between % and character specify field length to pad or chop */ static void log_printf_to_logs ( @@ -337,7 +337,7 @@ static void log_printf_to_logs ( while (isdigit (format_buffer[format_buffer_idx])) { format_buffer_idx += 1; } - + switch (format_buffer[format_buffer_idx]) { case 's': len = strcpy_cutoff (&output_buffer[output_buffer_idx], subsys, cutoff); @@ -387,7 +387,7 @@ static void log_printf_to_logs ( * Output to syslog */ if ((logsys_loggers[subsysid].mode & LOGSYS_MODE_OUTPUT_SYSLOG) && - ((level <= logsys_loggers[subsysid].syslog_priority) || + ((level <= logsys_loggers[subsysid].syslog_priority) || (logsys_loggers[subsysid].debug != 0))) { syslog (level | logsys_loggers[subsysid].syslog_facility, "%s", output_buffer); } @@ -765,7 +765,7 @@ static void logsys_subsys_init ( &logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT], sizeof(logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT])); logsys_loggers[subsysid].tags = LOGSYS_TAG_LOG; - logsys_loggers[subsysid].init_status = + logsys_loggers[subsysid].init_status = LOGSYS_LOGGER_INIT_DONE; } strncpy (logsys_loggers[subsysid].subsys, subsys, @@ -851,7 +851,7 @@ unsigned int _logsys_subsys_create (const char *subsys) for (i = 0; i < LOGSYS_MAX_SUBSYS_COUNT; i++) { if (strcmp (logsys_loggers[i].subsys, "") == 0) { - logsys_subsys_init(subsys, i); + logsys_subsys_init(subsys, i); break; } } @@ -864,7 +864,7 @@ unsigned int _logsys_subsys_create (const char *subsys) int _logsys_wthread_create (void) { - if (((logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT].mode & LOGSYS_MODE_FORK) == 0) && + if (((logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT].mode & LOGSYS_MODE_FORK) == 0) && ((logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT].mode & LOGSYS_MODE_THREADED) != 0)) { wthread_create(); atexit (logsys_atexit); @@ -928,7 +928,7 @@ void _logsys_log_rec ( int words_written; record_reclaim_size = 0; - + /* * Decode VA Args */ @@ -1045,7 +1045,7 @@ void _logsys_log_rec ( flt_data[index_start] = words_written; /* - * If the index of the current head equals the current log_rec_idx, + * If the index of the current head equals the current log_rec_idx, * and this is not a log_printf operation, set the log_rec_idx to * the new head position and commit the new head. */ diff --git a/exec/main.c b/exec/main.c index eb9779fd..6392c744 100644 --- a/exec/main.c +++ b/exec/main.c @@ -165,7 +165,7 @@ static void *corosync_exit (void *arg) } pthread_t corosync_exit_thread; -static void init_shutdown(void *data) +static void init_shutdown(void *data) { pthread_create (&corosync_exit_thread, NULL, corosync_exit, NULL); } @@ -248,7 +248,7 @@ static int corosync_sync_callbacks_retrieve (int sync_id, { unsigned int ais_service_index; unsigned int ais_services_found = 0; - + for (ais_service_index = 0; ais_service_index < SERVICE_HANDLER_MAXIMUM_COUNT; ais_service_index++) { @@ -348,7 +348,7 @@ static void corosync_tty_detach (void) /* Create new session */ (void)setsid(); - /* + /* * Map stdin/out/err to /dev/null. */ fd = open("/dev/null", O_RDWR); @@ -359,7 +359,7 @@ static void corosync_tty_detach (void) dup2(fd, STDERR_FILENO); /* 2 */ /* Should be 0, but just in case it isn't... */ - if (fd > 2) + if (fd > 2) close(fd); } } @@ -564,7 +564,7 @@ struct sending_allowed_private_data_struct { static int corosync_sending_allowed ( unsigned int service, - unsigned int id, + unsigned int id, void *msg, void *sending_allowed_private_data) { @@ -607,20 +607,20 @@ static void ipc_log_printf (const char *format, ...) { va_start (ap, format); - _logsys_log_printf (ipc_subsys_id, __FUNCTION__, + _logsys_log_printf (ipc_subsys_id, __FUNCTION__, __FILE__, __LINE__, LOGSYS_LEVEL_ERROR, format, ap); va_end (ap); } static void ipc_fatal_error(const char *error_msg) { - _logsys_log_printf (ipc_subsys_id, __FUNCTION__, + _logsys_log_printf (ipc_subsys_id, __FUNCTION__, __FILE__, __LINE__, LOGSYS_LEVEL_ERROR, "%s", error_msg); exit(EXIT_FAILURE); } static int corosync_poll_handler_accept ( - hdb_handle_t handle, + hdb_handle_t handle, int fd, int revent, void *context) @@ -629,7 +629,7 @@ static int corosync_poll_handler_accept ( } static int corosync_poll_handler_dispatch ( - hdb_handle_t handle, + hdb_handle_t handle, int fd, int revent, void *context) @@ -708,9 +708,9 @@ int main (int argc, char **argv) */ background = 1; setprio = 1; - + while ((ch = getopt (argc, argv, "fp")) != EOF) { - + switch (ch) { case 'f': background = 0; @@ -726,7 +726,7 @@ int main (int argc, char **argv) " -p : Do not set process priority. \n"); return EXIT_FAILURE; } - } + } if (background) corosync_tty_detach (); @@ -743,7 +743,7 @@ int main (int argc, char **argv) #if MSG_NOSIGNAL == 0 (void)signal (SIGPIPE, SIG_IGN); #endif - + corosync_timer_init ( serialize_lock, serialize_unlock, diff --git a/exec/mainconfig.h b/exec/mainconfig.h index b40c7a83..c9ab7ea6 100644 --- a/exec/mainconfig.h +++ b/exec/mainconfig.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/exec/mempool.c b/exec/mempool.c index fbaeef51..e6cb2066 100644 --- a/exec/mempool.c +++ b/exec/mempool.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -84,7 +84,7 @@ int mempool_init (int pool_sizes[MEMPOOL_GROUP_SIZE]) list_init (&mempool_group[i].free); mempool_group[i].free_entries = pool_sizes[i]; mempool_group[i].used_entries = 0; - + for (j = 0; j < pool_sizes[i]; j++) { entry = (struct mempool_entry *)p; @@ -121,7 +121,7 @@ void *mempool_malloc (size_t size) if (((1 << i) >= size) && mempool_group[i].free_entries) { - + mempool_group[i].used_entries += 1; mempool_group[i].free_entries -= 1; mempool_entry = list_entry (mempool_group[i].free.next, @@ -157,7 +157,7 @@ void *mempool_realloc (void *ptr, size_t size) { void *new_ptr; mempool_entry = ((struct mempool_entry *)((unsigned long)(ptr) - (unsigned long)(&((struct mempool_entry *)0)->mem))); - + if (ptr == 0 || (1 << mempool_entry->mempool_entry) < size) { /* * Must grow allocated block, copy memory, free old block diff --git a/exec/mempool.h b/exec/mempool.h index ded58ac2..c9d9c5bb 100644 --- a/exec/mempool.h +++ b/exec/mempool.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/exec/service.c b/exec/service.c index 3f07d60c..073abdbb 100644 --- a/exec/service.c +++ b/exec/service.c @@ -211,7 +211,7 @@ static int corosync_service_unlink_common ( struct corosync_api_v1 *corosync_api, hdb_handle_t object_service_handle, const char *service_name, - unsigned int service_version) + unsigned int service_version) { unsigned int res; unsigned short *service_id; @@ -222,13 +222,13 @@ static int corosync_service_unlink_common ( strlen ("handle"), (void *)&found_service_handle, NULL); - + res = corosync_api->object_key_get (object_service_handle, "service_id", strlen ("service_id"), (void *)&service_id, NULL); - + log_printf(LOGSYS_LEVEL_NOTICE, "Unloading corosync component: %s v%u\n", service_name, service_version); @@ -236,8 +236,8 @@ static int corosync_service_unlink_common ( ais_service[*service_id]->exec_exit_fn (); } ais_service[*service_id] = NULL; - - return lcr_ifact_release (*found_service_handle); + + return lcr_ifact_release (*found_service_handle); } extern unsigned int corosync_service_unlink_and_exit ( @@ -300,7 +300,7 @@ extern unsigned int corosync_service_unlink_all ( unsigned int *service_ver; hdb_handle_t object_service_handle; hdb_handle_t object_find_handle; - int found; + int found; log_printf(LOGSYS_LEVEL_NOTICE, "Unloading all corosync components\n"); @@ -365,7 +365,7 @@ unsigned int corosync_service_defaults_link_and_init (struct corosync_api_v1 *co char *found_service_ver; unsigned int found_service_ver_atoi; hdb_handle_t object_find_handle; - + corosync_api->object_create (OBJECT_PARENT_HANDLE, &object_internal_configuration_handle, "internal_configuration", @@ -415,6 +415,6 @@ unsigned int corosync_service_defaults_link_and_init (struct corosync_api_v1 *co default_services[i].name, default_services[i].ver); } - + return (0); } diff --git a/exec/sync.c b/exec/sync.c index ffc08521..d34ee165 100644 --- a/exec/sync.c +++ b/exec/sync.c @@ -273,7 +273,7 @@ int sync_register ( log_printf (LOGSYS_LEVEL_ERROR, "Couldn't join group.\n"); return (-1); } - + sync_callbacks_retrieve = callbacks_retrieve; sync_synchronization_completed = synchronization_completed; return (0); diff --git a/exec/tlist.h b/exec/tlist.h index 8c57a7f6..263c8d74 100644 --- a/exec/tlist.h +++ b/exec/tlist.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -119,7 +119,7 @@ static inline int timerlist_add_absolute (struct timerlist *timerlist, errno = ENOMEM; return (-1); } - + timer->nano_from_epoch = nano_from_epoch; timer->data = data; timer->timer_fn = timer_fn; @@ -143,7 +143,7 @@ static inline int timerlist_add_duration (struct timerlist *timerlist, errno = ENOMEM; return (-1); } - + timer->nano_from_epoch = timerlist_nano_from_epoch() + nano_duration; timer->data = data; timer->timer_fn = timer_fn; @@ -211,7 +211,7 @@ static inline unsigned long long timerlist_msec_duration_to_expire (struct timer if (timerlist->timer_head.next == &timerlist->timer_head) { return (-1); } - + timer_from_list = list_entry (timerlist->timer_head.next, struct timerlist_timer, list); @@ -223,7 +223,7 @@ static inline unsigned long long timerlist_msec_duration_to_expire (struct timer if (timer_from_list->nano_from_epoch < nano_from_epoch) { return (0); } - + msec_duration_to_expire = ((timer_from_list->nano_from_epoch - nano_from_epoch) / 1000000ULL) + (1000 / HZ); return (msec_duration_to_expire); diff --git a/exec/totemconfig.h b/exec/totemconfig.h index 718c6fb5..7169c071 100644 --- a/exec/totemconfig.h +++ b/exec/totemconfig.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -48,7 +48,7 @@ extern int totem_config_read ( struct objdb_iface_ver0 *objdb, struct totem_config *totem_config, const char **error_string); - + extern int totem_config_validate ( struct totem_config *totem_config, const char **error_string); diff --git a/exec/totemnet.c b/exec/totemnet.c index 6c83c6c0..bd9ab3d9 100644 --- a/exec/totemnet.c +++ b/exec/totemnet.c @@ -69,9 +69,9 @@ #include "crypto.h" -#define MCAST_SOCKET_BUFFER_SIZE (TRANSMITS_ALLOWED * FRAME_SIZE_MAX) +#define MCAST_SOCKET_BUFFER_SIZE (TRANSMITS_ALLOWED * FRAME_SIZE_MAX) -#define NETIF_STATE_REPORT_UP 1 +#define NETIF_STATE_REPORT_UP 1 #define NETIF_STATE_REPORT_DOWN 2 #define BIND_STATE_UNBOUND 0 @@ -254,7 +254,7 @@ static int authenticate_and_decrypt ( memset (keys, 0, sizeof (keys)); sober128_start (&keygen_prng_state); sober128_add_entropy (instance->totemnet_private_key, - instance->totemnet_private_key_len, &keygen_prng_state); + instance->totemnet_private_key_len, &keygen_prng_state); sober128_add_entropy (header->salt, sizeof (header->salt), &keygen_prng_state); sober128_read (keys, sizeof (keys), &keygen_prng_state); @@ -263,15 +263,15 @@ static int authenticate_and_decrypt ( * Setup stream cipher */ sober128_start (&stream_prng_state); - sober128_add_entropy (cipher_key, 16, &stream_prng_state); - sober128_add_entropy (initial_vector, 16, &stream_prng_state); + sober128_add_entropy (cipher_key, 16, &stream_prng_state); + sober128_add_entropy (initial_vector, 16, &stream_prng_state); /* * Authenticate contents of message */ hmac_init (&instance->totemnet_hmac_state, DIGEST_SHA1, hmac_key, 16); - hmac_process (&instance->totemnet_hmac_state, + hmac_process (&instance->totemnet_hmac_state, (unsigned char *)iov->iov_base + HMAC_HASH_SIZE, iov->iov_len - HMAC_HASH_SIZE); @@ -283,7 +283,7 @@ static int authenticate_and_decrypt ( log_printf (instance->totemnet_log_level_security, "Received message has invalid digest... ignoring.\n"); return (-1); } - + /* * Decrypt the contents of the message with the cipher key */ @@ -328,7 +328,7 @@ static void encrypt_and_sign_worker ( sober128_start (&keygen_prng_state); sober128_add_entropy (instance->totemnet_private_key, instance->totemnet_private_key_len, - &keygen_prng_state); + &keygen_prng_state); sober128_add_entropy (header->salt, sizeof (header->salt), &keygen_prng_state); @@ -338,8 +338,8 @@ static void encrypt_and_sign_worker ( * Setup stream cipher */ sober128_start (&stream_prng_state); - sober128_add_entropy (cipher_key, 16, &stream_prng_state); - sober128_add_entropy (initial_vector, 16, &stream_prng_state); + sober128_add_entropy (cipher_key, 16, &stream_prng_state); + sober128_add_entropy (initial_vector, 16, &stream_prng_state); outlen = sizeof (struct security_header); /* @@ -365,7 +365,7 @@ static void encrypt_and_sign_worker ( */ hmac_init (&hmac_st, DIGEST_SHA1, hmac_key, 16); - hmac_process (&hmac_st, + hmac_process (&hmac_st, buf + HMAC_HASH_SIZE, outlen - HMAC_HASH_SIZE); @@ -682,7 +682,7 @@ static int net_deliver_fn ( instance->context, msg_offset, size_delv); - + iovec->iov_len = FRAME_SIZE_MAX; return (0); } @@ -703,7 +703,7 @@ static int netif_determine ( return (res); } - + /* * If the interface is up, the sockets for totem are built. If the interface is down @@ -827,7 +827,7 @@ static void timer_function_netif_check_timeout ( &instance->timer_netif_check_timeout); } - } else { + } else { if (instance->netif_state_report & NETIF_STATE_REPORT_DOWN) { log_printf (instance->totemnet_log_level_notice, "The network interface is down.\n"); @@ -881,7 +881,7 @@ static int totemnet_build_sockets_ip ( int addrlen; int res; int flag; - + /* * Create multicast recv socket */ @@ -898,11 +898,11 @@ static int totemnet_build_sockets_ip ( return (-1); } - /* + /* * Force reuse */ flag = 1; - if ( setsockopt(sockets->mcast_recv, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) { + if ( setsockopt(sockets->mcast_recv, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) { perror("setsockopt reuseaddr"); return (-1); } @@ -934,11 +934,11 @@ static int totemnet_build_sockets_ip ( return (-1); } - /* + /* * Force reuse */ flag = 1; - if ( setsockopt(sockets->mcast_send, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) { + if ( setsockopt(sockets->mcast_send, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) { perror("setsockopt reuseaddr"); return (-1); } @@ -967,11 +967,11 @@ static int totemnet_build_sockets_ip ( return (-1); } - /* + /* * Force reuse */ flag = 1; - if ( setsockopt(sockets->token, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) { + if ( setsockopt(sockets->token, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof (flag)) < 0) { perror("setsockopt reuseaddr"); return (-1); } @@ -1038,7 +1038,7 @@ static int totemnet_build_sockets_ip ( } break; } - + /* * Turn on multicast loopback */ @@ -1102,7 +1102,7 @@ static int totemnet_build_sockets_ip ( } break; } - + return 0; } @@ -1139,7 +1139,7 @@ static int totemnet_build_sockets ( totemnet_traffic_control_set(instance, sockets->token); return res; } - + /* * Totem Network interface - also does encryption/decryption * depends on poll abstraction, POSIX, IPV4 @@ -1323,7 +1323,7 @@ int totemnet_send_flush (hdb_handle_t handle) res = ENOENT; goto error_exit; } - + worker_thread_group_wait (&instance->worker_thread_group); hdb_handle_put (&totemnet_instance_database, handle); @@ -1368,7 +1368,7 @@ int totemnet_mcast_flush_send ( res = ENOENT; goto error_exit; } - + mcast_sendmsg (instance, iovec, iov_len); hdb_handle_put (&totemnet_instance_database, handle); @@ -1392,18 +1392,18 @@ int totemnet_mcast_noflush_send ( res = ENOENT; goto error_exit; } - + if (instance->totem_config->threads) { memcpy (&work_item.iovec[0], iovec, iov_len * sizeof (struct iovec)); work_item.iov_len = iov_len; work_item.instance = instance; worker_thread_group_work_add (&instance->worker_thread_group, - &work_item); + &work_item); } else { mcast_sendmsg (instance, iovec, iov_len); } - + hdb_handle_put (&totemnet_instance_database, handle); error_exit: return (res); @@ -1420,7 +1420,7 @@ extern int totemnet_iface_check (hdb_handle_t handle) res = ENOENT; goto error_exit; } - + timer_function_netif_check_timeout (instance); hdb_handle_put (&totemnet_instance_database, handle); @@ -1450,7 +1450,7 @@ const char *totemnet_iface_print (hdb_handle_t handle) { ret_char = "Invalid totemnet handle"; goto error_exit; } - + ret_char = totemip_print (&instance->my_id); hdb_handle_put (&totemnet_instance_database, handle); @@ -1470,7 +1470,7 @@ int totemnet_iface_get ( if (res != 0) { goto error_exit; } - + memcpy (addr, &instance->my_id, sizeof (struct totem_ip_address)); hdb_handle_put (&totemnet_instance_database, handle); @@ -1491,7 +1491,7 @@ int totemnet_token_target_set ( if (res != 0) { goto error_exit; } - + memcpy (&instance->token_target, token_target, sizeof (struct totem_ip_address)); diff --git a/exec/totemnet.h b/exec/totemnet.h index e3be2772..ea3f7760 100644 --- a/exec/totemnet.h +++ b/exec/totemnet.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/exec/totempg.c b/exec/totempg.c index 47f84136..fdcd8e18 100644 --- a/exec/totempg.c +++ b/exec/totempg.c @@ -123,16 +123,16 @@ struct totempg_mcast_header { */ struct totempg_mcast { struct totempg_mcast_header header; - unsigned char fragmented; - unsigned char continuation; + unsigned char fragmented; + unsigned char continuation; unsigned short msg_count; /* * short msg_len[msg_count]; - */ - /* + */ + /* * data for messages */ -}; +}; /* * Maximum packet size for totem pg messages @@ -189,12 +189,12 @@ DECLARE_LIST_INIT(assembly_list_free); /* * Staging buffer for packed messages. Messages are staged in this buffer - * before sending. Multiple messages may fit which cuts down on the - * number of mcasts sent. If a message doesn't completely fit, then - * the mcast header has a fragment bit set that says that there are more + * before sending. Multiple messages may fit which cuts down on the + * number of mcasts sent. If a message doesn't completely fit, then + * the mcast header has a fragment bit set that says that there are more * data to follow. fragment_size is an index into the buffer. It indicates - * the size of message data and where to place new message data. - * fragment_contuation indicates whether the first packed message in + * the size of message data and where to place new message data. + * fragment_contuation indicates whether the first packed message in * the buffer is a continuation of a previously packed fragment. */ static unsigned char *fragmentation_data; @@ -256,7 +256,7 @@ static struct assembly *assembly_ref (unsigned int nodeid) */ for (list = assembly_list_inuse.next; list != &assembly_list_inuse; - list = list->next) { + list = list->next) { assembly = list_entry (list, struct assembly, list); @@ -381,7 +381,7 @@ static inline int group_matches ( int i; int j; struct iovec iovec_aligned = { NULL, 0 }; - + assert (iov_len == 1); /* @@ -422,7 +422,7 @@ static inline int group_matches ( } return (0); } - + static inline void app_deliver_fn ( unsigned int nodeid, @@ -525,8 +525,8 @@ static void totempg_deliver_fn ( * assemble the packet contents into one block of data to simplify delivery */ if (iov_len == 1) { - /* - * This message originated from external processor + /* + * This message originated from external processor * because there is only one iovec for the full msg. */ char *data; @@ -540,7 +540,7 @@ static void totempg_deliver_fn ( msg_count = mcast->msg_count; datasize = sizeof (struct totempg_mcast) + msg_count * sizeof (unsigned short); - + memcpy (header, iovec[0].iov_base, datasize); assert(iovec); data = iovec[0].iov_base; @@ -555,8 +555,8 @@ static void totempg_deliver_fn ( memcpy (&assembly->data[assembly->index], &data[datasize], iovec[0].iov_len - datasize); } else { - /* - * The message originated from local processor + /* + * The message originated from local processor * becasue there is greater than one iovec for then full msg. */ h_index = 0; @@ -582,7 +582,7 @@ static void totempg_deliver_fn ( /* * If the last message in the buffer is a fragment, then we * can't deliver it. We'll first deliver the full messages - * then adjust the assembly buffer so we can add the rest of the + * then adjust the assembly buffer so we can add the rest of the * fragment when it arrives. */ msg_count = mcast->fragmented ? mcast->msg_count - 1 : mcast->msg_count; @@ -596,7 +596,7 @@ static void totempg_deliver_fn ( * Also, if the first packed message is a continuation * of a previous message, but the assembly buffer * is empty, then we need to discard it since we can't - * assemble a complete message. Likewise, if this message isn't a + * assemble a complete message. Likewise, if this message isn't a * continuation and the assembly buffer is empty, we have to discard * the continued message. */ @@ -612,7 +612,7 @@ static void totempg_deliver_fn ( iov_delv.iov_len = msg_lens[1]; start = 1; } - } else + } else if (assembly->throw_away_mode == THROW_AWAY_INACTIVE) { if (continuation == assembly->last_frag_num) { assembly->last_frag_num = mcast->fragmented; @@ -731,7 +731,7 @@ int totempg_initialize ( totempg_confchg_fn); totemmrp_callback_token_create ( - &callback_token_received_handle, + &callback_token_received_handle, TOTEM_CALLBACK_TOKEN_RECEIVED, 0, callback_token_received_fn, @@ -764,7 +764,7 @@ static int mcast_msg ( int i; int dest, src; int max_packet_size = 0; - int copy_len = 0; + int copy_len = 0; int copy_base = 0; int total_size = 0; @@ -813,7 +813,7 @@ static int mcast_msg ( * fragment_buffer on exit so that max_packet_size + fragment_size * doesn't exceed the size of the fragment_buffer on the next call. */ - if ((copy_len + fragment_size) < + if ((copy_len + fragment_size) < (max_packet_size - sizeof (unsigned short))) { memcpy (&fragmentation_data[fragment_size], @@ -850,7 +850,7 @@ static int mcast_msg ( * fit, then indicate a fragment. This also means that the next * message will have the continuation of this one. */ - if ((i < (iov_len - 1)) || + if ((i < (iov_len - 1)) || ((copy_base + copy_len) < iovec[i].iov_len)) { if (!next_fragment) { next_fragment++; @@ -870,7 +870,7 @@ static int mcast_msg ( iovecs[0].iov_base = &mcast; iovecs[0].iov_len = sizeof(struct totempg_mcast); iovecs[1].iov_base = mcast_packed_msg_lens; - iovecs[1].iov_len = mcast_packed_msg_count * + iovecs[1].iov_len = mcast_packed_msg_count * sizeof(unsigned short); iovecs[2].iov_base = data_ptr; iovecs[2].iov_len = max_packet_size; @@ -892,7 +892,7 @@ static int mcast_msg ( copy_len = 0; copy_base = 0; i++; - + /* * Continue with the rest of the current iovec. */ @@ -924,7 +924,7 @@ static int msg_count_send_ok ( int avail = 0; avail = totemmrp_avail () - totempg_reserved - 1; - + return (avail > msg_count); } @@ -936,7 +936,7 @@ static int byte_count_send_ok ( avail = totemmrp_avail () - 1; - msg_count = (byte_count / (totempg_totem_config->net_mtu - 25)) + 1; + msg_count = (byte_count / (totempg_totem_config->net_mtu - 25)) + 1; return (avail > msg_count); } @@ -946,7 +946,7 @@ static int send_reserve ( { unsigned int msg_count = 0; - msg_count = (msg_size / (totempg_totem_config->net_mtu - 25)) + 1; + msg_count = (msg_size / (totempg_totem_config->net_mtu - 25)) + 1; totempg_reserved += msg_count; return (msg_count); @@ -1062,7 +1062,7 @@ int totempg_groups_join ( res = ENOMEM; goto error_exit; } - memcpy (&new_groups[instance->groups_cnt], + memcpy (&new_groups[instance->groups_cnt], groups, group_cnt * sizeof (struct totempg_group)); instance->groups = new_groups; instance->groups_cnt = instance->groups_cnt = group_cnt; @@ -1269,7 +1269,7 @@ int totempg_groups_send_ok_groups ( } res = msg_count_send_ok (size); - + hdb_handle_put (&totempg_groups_instance_database, handle); error_exit: pthread_mutex_unlock (&totempg_mutex); diff --git a/exec/totemrrp.c b/exec/totemrrp.c index d28dc5be..32720478 100644 --- a/exec/totemrrp.c +++ b/exec/totemrrp.c @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -140,7 +140,7 @@ struct rrp_algo { void (*token_send) ( struct totemrrp_instance *instance, const struct iovec *iovec, - unsigned int iov_len); + unsigned int iov_len); void (*recv_flush) ( struct totemrrp_instance *instance); @@ -172,7 +172,7 @@ struct totemrrp_instance { struct rrp_algo *rrp_algo; void *context; - + char *status[INTERFACE_MAX]; void (*totemrrp_deliver_fn) ( @@ -257,7 +257,7 @@ static void none_token_recv ( static void none_token_send ( struct totemrrp_instance *instance, const struct iovec *iovec, - unsigned int iov_len); + unsigned int iov_len); static void none_recv_flush ( struct totemrrp_instance *instance); @@ -315,7 +315,7 @@ static void passive_token_recv ( static void passive_token_send ( struct totemrrp_instance *instance, const struct iovec *iovec, - unsigned int iov_len); + unsigned int iov_len); static void passive_recv_flush ( struct totemrrp_instance *instance); @@ -373,7 +373,7 @@ static void active_token_recv ( static void active_token_send ( struct totemrrp_instance *instance, const struct iovec *iovec, - unsigned int iov_len); + unsigned int iov_len); static void active_recv_flush ( struct totemrrp_instance *instance); @@ -723,10 +723,10 @@ static void passive_mcast_recv ( for (i = 0; i < rrp_instance->interface_count; i++) { if ((passive_instance->faulty[i] == 0) && - (max - passive_instance->mcast_recv_count[i] > + (max - passive_instance->mcast_recv_count[i] > rrp_instance->totem_config->rrp_problem_count_threshold)) { passive_instance->faulty[i] = 1; - sprintf (rrp_instance->status[i], + sprintf (rrp_instance->status[i], "Marking ringid %u interface %s FAULTY - adminisrtative intervention required.", i, totemnet_iface_print (rrp_instance->net_handles[i])); @@ -748,7 +748,7 @@ static void passive_mcast_flush_send ( do { passive_instance->msg_xmit_iface = (passive_instance->msg_xmit_iface + 1) % instance->interface_count; } while (passive_instance->faulty[passive_instance->msg_xmit_iface] == 1); - + totemnet_mcast_flush_send (instance->net_handles[passive_instance->msg_xmit_iface], iovec, iov_len); } @@ -762,8 +762,8 @@ static void passive_mcast_noflush_send ( do { passive_instance->msg_xmit_iface = (passive_instance->msg_xmit_iface + 1) % instance->interface_count; } while (passive_instance->faulty[passive_instance->msg_xmit_iface] == 1); - - + + totemnet_mcast_noflush_send (instance->net_handles[passive_instance->msg_xmit_iface], iovec, iov_len); } @@ -806,10 +806,10 @@ static void passive_token_recv ( for (i = 0; i < rrp_instance->interface_count; i++) { if ((passive_instance->faulty[i] == 0) && - (max - passive_instance->token_recv_count[i] > + (max - passive_instance->token_recv_count[i] > rrp_instance->totem_config->rrp_problem_count_threshold)) { passive_instance->faulty[i] = 1; - sprintf (rrp_instance->status[i], + sprintf (rrp_instance->status[i], "Marking seqid %d ringid %u interface %s FAULTY - adminisrtative intervention required.", token_seq, i, @@ -832,7 +832,7 @@ static void passive_token_send ( do { passive_instance->token_xmit_iface = (passive_instance->token_xmit_iface + 1) % instance->interface_count; } while (passive_instance->faulty[passive_instance->token_xmit_iface] == 1); - + totemnet_token_send ( instance->net_handles[passive_instance->token_xmit_iface], iovec, iov_len); @@ -972,16 +972,16 @@ static void timer_function_active_problem_decrementer (void *context) struct totemrrp_instance *rrp_instance = active_instance->rrp_instance; unsigned int problem_found = 0; unsigned int i; - + for (i = 0; i < rrp_instance->interface_count; i++) { if (active_instance->counter_problems[i] > 0) { problem_found = 1; active_instance->counter_problems[i] -= 1; if (active_instance->counter_problems[i] == 0) { - sprintf (rrp_instance->status[i], + sprintf (rrp_instance->status[i], "ring %d active with no faults", i); } else { - sprintf (rrp_instance->status[i], + sprintf (rrp_instance->status[i], "Decrementing problem counter for iface %s to [%d of %d]", totemnet_iface_print (rrp_instance->net_handles[i]), active_instance->counter_problems[i], @@ -1013,7 +1013,7 @@ static void timer_function_active_token_expired (void *context) if (active_instance->timer_problem_decrementer == 0) { active_timer_problem_decrementer_start (active_instance); } - sprintf (rrp_instance->status[i], + sprintf (rrp_instance->status[i], "Incrementing problem counter for seqid %d iface %s to [%d of %d]", active_instance->last_token_seq, totemnet_iface_print (rrp_instance->net_handles[i]), @@ -1029,7 +1029,7 @@ static void timer_function_active_token_expired (void *context) if (active_instance->counter_problems[i] >= rrp_instance->totem_config->rrp_problem_count_threshold) { active_instance->faulty[i] = 1; - sprintf (rrp_instance->status[i], + sprintf (rrp_instance->status[i], "Marking seqid %d ringid %u interface %s FAULTY - adminisrtative intervention required.", active_instance->last_token_seq, i, @@ -1323,7 +1323,7 @@ void rrp_deliver_fn ( if (token_is) { /* - * Deliver to the token receiver for this rrp algorithm + * Deliver to the token receiver for this rrp algorithm */ deliver_fn_context->instance->rrp_algo->token_recv ( deliver_fn_context->instance, @@ -1334,7 +1334,7 @@ void rrp_deliver_fn ( token_seqid); } else { /* - * Deliver to the mcast receiver for this rrp algorithm + * Deliver to the mcast receiver for this rrp algorithm */ deliver_fn_context->instance->rrp_algo->mcast_recv ( deliver_fn_context->instance, @@ -1578,7 +1578,7 @@ int totemrrp_send_flush (hdb_handle_t handle) res = ENOENT; goto error_exit; } - + instance->rrp_algo->send_flush (instance); hdb_handle_put (&totemrrp_instance_database, handle); @@ -1624,7 +1624,7 @@ int totemrrp_mcast_flush_send ( res = ENOENT; goto error_exit; } - + // TODO this needs to return the result instance->rrp_algo->mcast_flush_send (instance, iovec, iov_len); @@ -1647,7 +1647,7 @@ int totemrrp_mcast_noflush_send ( res = ENOENT; goto error_exit; } - + /* * merge detects go out through mcast_flush_send so it is safe to * flush these messages if we are only one processor. This avoids @@ -1675,7 +1675,7 @@ int totemrrp_iface_check (hdb_handle_t handle) res = ENOENT; goto error_exit; } - + instance->rrp_algo->iface_check (instance); hdb_handle_put (&totemrrp_instance_database, handle); @@ -1697,9 +1697,9 @@ int totemrrp_ifaces_get ( res = ENOENT; goto error_exit; } - + *status = instance->status; - + if (iface_count) { *iface_count = instance->interface_count; } @@ -1724,7 +1724,7 @@ printf ("totemrrp ring reenable\n"); res = ENOENT; goto error_exit; } - + instance->rrp_algo->ring_reenable (instance); for (i = 0; i < instance->interface_count; i++) { diff --git a/exec/totemsrp.c b/exec/totemsrp.c index 42bf3f64..aef6cd21 100644 --- a/exec/totemsrp.c +++ b/exec/totemsrp.c @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -35,7 +35,7 @@ /* * The first version of this code was based upon Yair Amir's PhD thesis: - * http://www.cs.jhu.edu/~yairamir/phd.ps) (ch4,5). + * http://www.cs.jhu.edu/~yairamir/phd.ps) (ch4,5). * * The current version of totemsrp implements the Totem protocol specified in: * http://citeseer.ist.psu.edu/amir95totem.html @@ -87,7 +87,7 @@ #define QUEUE_RTR_ITEMS_SIZE_MAX 256 /* allow 256 retransmit items */ #define RETRANS_MESSAGE_QUEUE_SIZE_MAX 500 /* allow 500 messages to be queued */ #define RECEIVED_MESSAGE_QUEUE_SIZE_MAX 500 /* allow 500 messages to be queued */ -#define MAXIOVS 5 +#define MAXIOVS 5 #define RETRANSMIT_ENTRIES_MAX 30 #define TOKEN_SIZE_MAX 64000 /* bytes */ @@ -110,7 +110,7 @@ /* * These can be used ot test different rollover points - * #define SEQNO_START_MSG 0xfffffe00 + * #define SEQNO_START_MSG 0xfffffe00 * #define SEQNO_START_TOKEN 0xfffffe00 */ @@ -144,7 +144,7 @@ enum encapsulation_type { MESSAGE_NOT_ENCAPSULATED = 2 }; -/* +/* * New membership algorithm local variables */ struct srp_addr { @@ -213,7 +213,7 @@ struct orf_token { unsigned int token_seq; unsigned int aru; unsigned int aru_addr; - struct memb_ring_id ring_id; + struct memb_ring_id ring_id; unsigned int backlog; unsigned int fcc; int retrans_flg; @@ -236,7 +236,7 @@ struct memb_join { */ } __attribute__((packed)); - + struct memb_merge_detect { struct message_header header; struct srp_addr system_from; @@ -368,7 +368,7 @@ struct totemsrp_instance { int my_retrans_flg_count; unsigned int my_high_ring_delivered; - + int heartbeat_timeout; /* @@ -433,7 +433,7 @@ struct totemsrp_instance { int totemsrp_subsys_id; - void (*totemsrp_log_printf) (int subsys, + void (*totemsrp_log_printf) (int subsys, const char *function, const char *file, int line, unsigned int level, const char *format, ...)__attribute__((format(printf, 6, 7)));; @@ -718,7 +718,7 @@ int totemsrp_initialize ( if (rundir == NULL) { rundir = LOCALSTATEDIR "/lib/corosync"; } - + res = mkdir (rundir, 0700); if (res == -1 && errno != EEXIST) { goto error_put; @@ -820,13 +820,13 @@ int totemsrp_initialize ( } if (instance->use_heartbeat) { - instance->heartbeat_timeout - = (totem_config->heartbeat_failures_allowed) * totem_config->token_retransmit_timeout + instance->heartbeat_timeout + = (totem_config->heartbeat_failures_allowed) * totem_config->token_retransmit_timeout + totem_config->max_network_delay; if (instance->heartbeat_timeout >= totem_config->token_timeout) { log_printf (instance->totemsrp_log_level_notice, - "total heartbeat_timeout (%d ms) is not less than token timeout (%d ms)\n", + "total heartbeat_timeout (%d ms) is not less than token timeout (%d ms)\n", instance->heartbeat_timeout, totem_config->token_timeout); log_printf (instance->totemsrp_log_level_notice, @@ -840,7 +840,7 @@ int totemsrp_initialize ( "total heartbeat_timeout (%d ms)\n", instance->heartbeat_timeout); } } - + totemrrp_initialize ( poll_handle, &instance->totemrrp_handle, @@ -918,7 +918,7 @@ int totemsrp_ifaces_get ( *iface_count = instance->totem_config->interface_count; goto finish; } - + for (i = 0; i < instance->my_left_memb_entries; i++) { if (instance->my_left_memb_list[i].addr[0].nodeid == nodeid) { found = 1; @@ -1236,7 +1236,7 @@ static void memb_set_merge ( if (srp_addr_equal (&fullset[j], &subset[i])) { found = 1; break; - } + } } if (found == 0) { srp_addr_copy (&fullset[*fullset_entries], &subset[i]); @@ -1476,7 +1476,7 @@ static void timer_function_orf_token_timeout (void *data) "The token was lost in the COMMIT state.\n"); memb_state_gather_enter (instance, 4); break; - + case MEMB_STATE_RECOVERY: log_printf (instance->totemsrp_log_level_notice, "The token was lost in the RECOVERY state.\n"); @@ -1511,7 +1511,7 @@ static void memb_timer_function_state_gather (void *data) * Restart the join timeout `*/ poll_timer_delete (instance->totemsrp_poll_handle, instance->memb_timer_state_gather_join_timeout); - + poll_timer_add (instance->totemsrp_poll_handle, instance->totem_config->join_timeout, (void *)instance, @@ -1675,7 +1675,7 @@ static void memb_state_operational_enter (struct totemsrp_instance *instance) trans_memb_list_totemip, instance->my_trans_memb_entries, left_list, instance->my_left_memb_entries, 0, 0, &instance->my_ring_id); - + // TODO we need to filter to ensure we only deliver those // messages which are part of instance->my_deliver_memb messages_deliver_to_app (instance, 1, instance->old_ring_state_high_seq_received); @@ -1790,7 +1790,7 @@ static void memb_state_commit_enter ( { ring_save (instance); - old_ring_state_save (instance); + old_ring_state_save (instance); memb_state_commit_token_update (instance, commit_token); @@ -1947,7 +1947,7 @@ static void memb_state_recovery_enter ( low_ring_aru + 1, instance->old_ring_state_high_seq_received); strcpy (not_originated, "Not Originated for recovery: "); strcpy (is_originated, "Originated for recovery: "); - + for (i = 1; i <= range; i++) { struct sort_queue_item *sort_queue_item; struct message_item message_item; @@ -2046,7 +2046,7 @@ int totemsrp_mcast ( if (res != 0) { goto error_exit; } - + if (queue_is_full (&instance->new_message_queue)) { log_printf (instance->totemsrp_log_level_warning, "queue full\n"); return (-1); @@ -2104,7 +2104,7 @@ error_iovec: for (j = 0; j < i; j++) { free (message_item.iovec[j].iov_base); } - + free(message_item.mcast); error_mcast: @@ -2142,7 +2142,7 @@ error_exit: /* * ORF Token Management */ -/* +/* * Recast message to mcast group if it is available */ static int orf_token_remcast ( @@ -2166,7 +2166,7 @@ static int orf_token_remcast ( log_printf (instance->totemsrp_log_level_debug, "sq not in range\n"); return (-1); } - + /* * Get RTR item at seq, if not available, return */ @@ -2330,9 +2330,9 @@ static int orf_token_mcast ( memset (&sort_queue_item, 0, sizeof (struct sort_queue_item)); sort_queue_item.iovec[0].iov_base = message_item->mcast; sort_queue_item.iovec[0].iov_len = sizeof (struct mcast); - + mcast = sort_queue_item.iovec[0].iov_base; - + memcpy (&sort_queue_item.iovec[1], message_item->iovec, message_item->iov_len * sizeof (struct iovec)); @@ -2351,7 +2351,7 @@ static int orf_token_mcast ( totemrrp_mcast_noflush_send (instance->totemrrp_handle, sort_queue_item_ptr->iovec, sort_queue_item_ptr->iov_len); - + /* * Delete item from pending queue */ @@ -2397,7 +2397,7 @@ static int orf_token_rtr ( } rtr_list = &orf_token->rtr_list[0]; - + strcpy (retransmit_msg, "Retransmit List: "); if (orf_token->rtr_list_entries) { log_printf (instance->totemsrp_log_level_debug, @@ -2649,7 +2649,7 @@ static int orf_token_send_initial (struct totemsrp_instance *instance) orf_token.retrans_flg = 1; instance->my_set_retrans_flg = 1; } - + orf_token.aru = 0; orf_token.aru = SEQNO_START_MSG - 1; orf_token.aru_addr = instance->my_id.addr[0].nodeid; @@ -2800,7 +2800,7 @@ static int memb_lowest_in_config (struct totemsrp_instance *instance) /* * find representative by searching for smallest identifier */ - + lowest_addr = &token_memb[0].addr[0]; for (i = 1; i < token_memb_entries; i++) { if (totemip_compare(lowest_addr, &token_memb[i].addr[0]) > 0) { @@ -2881,7 +2881,7 @@ static void memb_join_message_send (struct totemsrp_instance *instance) memb_join.proc_list_entries = instance->my_proc_list_entries; memb_join.failed_list_entries = instance->my_failed_list_entries; srp_addr_copy (&memb_join.system_from, &instance->my_id); - + iovec[0].iov_base = &memb_join; iovec[0].iov_len = sizeof (struct memb_join); iovec[1].iov_base = &instance->my_proc_list; @@ -2906,7 +2906,7 @@ static void memb_join_message_send (struct totemsrp_instance *instance) iovs); } -static void memb_merge_detect_transmit (struct totemsrp_instance *instance) +static void memb_merge_detect_transmit (struct totemsrp_instance *instance) { struct memb_merge_detect memb_merge_detect; struct iovec iovec[2]; @@ -2958,7 +2958,7 @@ static void memb_ring_id_create_or_load ( log_printf (instance->totemsrp_log_level_warning, "Couldn't open %s %s\n", filename, strerror (errno)); } - + totemip_copy(&memb_ring_id->rep, &instance->my_id.addr[0]); assert (!totemip_zero_check(&memb_ring_id->rep)); instance->token_ring_id_seq = memb_ring_id->seq; @@ -3075,7 +3075,7 @@ static void token_callbacks_execute ( default: assert (0); } - + for (list = callback_listhead->next; list != callback_listhead; list = list_next) { @@ -3279,7 +3279,7 @@ static int message_handler_orf_token ( forward_token = 1; if (totemip_equal(&instance->my_ring_id.rep, &instance->my_id.addr[0])) { if (instance->my_token_held) { - forward_token = 0; + forward_token = 0; } } @@ -3310,7 +3310,7 @@ static int message_handler_orf_token ( if ((forward_token) && instance->use_heartbeat) { reset_heartbeat_timeout(instance); - } + } else { cancel_heartbeat_timeout(instance); } @@ -3340,7 +3340,7 @@ static int message_handler_orf_token ( } return (0); /* discard token */ - } + } transmits_allowed = fcc_calculate (instance, token); mcasted_retransmit = orf_token_rtr (instance, token, &transmits_allowed); @@ -3349,11 +3349,11 @@ static int message_handler_orf_token ( mcasted_regular = orf_token_mcast (instance, token, transmits_allowed); fcc_token_update (instance, token, mcasted_retransmit + mcasted_regular); - + if (sq_lt_compare (instance->my_aru, token->aru) || instance->my_id.addr[0].nodeid == token->aru_addr || token->aru_addr == 0) { - + token->aru = instance->my_aru; if (token->aru == token->seq) { token->aru_addr = 0; @@ -3369,7 +3369,7 @@ static int message_handler_orf_token ( if (instance->my_aru_count > instance->totem_config->fail_to_recv_const && token->aru_addr != instance->my_id.addr[0].nodeid) { - + log_printf (instance->totemsrp_log_level_error, "FAILED TO RECEIVE\n"); // TODO if we fail to receive, it may be possible to end with a gather @@ -3404,11 +3404,11 @@ static int message_handler_orf_token ( token->retrans_flg = 0; } log_printf (instance->totemsrp_log_level_debug, - "token retrans flag is %d my set retrans flag%d retrans queue empty %d count %d, aru %x\n", + "token retrans flag is %d my set retrans flag%d retrans queue empty %d count %d, aru %x\n", token->retrans_flg, instance->my_set_retrans_flg, queue_is_empty (&instance->retrans_message_queue), instance->my_retrans_flg_count, token->aru); - if (token->retrans_flg == 0) { + if (token->retrans_flg == 0) { instance->my_retrans_flg_count += 1; } else { instance->my_retrans_flg_count = 0; @@ -3444,9 +3444,9 @@ static int message_handler_orf_token ( instance->my_retrans_flg_count = 0; } } - + totemrrp_send_flush (instance->totemrrp_handle); - token_send (instance, token, forward_token); + token_send (instance, token, forward_token); #ifdef GIVEINFO gettimeofday (&tv_current, NULL); @@ -3619,7 +3619,7 @@ static int message_handler_mcast ( struct sort_queue_item sort_queue_item; struct sq *sort_queue; struct mcast mcast_header; - + if (endian_conversion_needed) { mcast_endian_convert (msg, &mcast_header); @@ -3698,7 +3698,7 @@ static int message_handler_mcast ( * otherwise free io vectors */ if (msg_len > 0 && msg_len < FRAME_SIZE_MAX && - sq_in_range (sort_queue, mcast_header.seq) && + sq_in_range (sort_queue, mcast_header.seq) && sq_item_inuse (sort_queue, mcast_header.seq) == 0) { /* @@ -3714,7 +3714,7 @@ static int message_handler_mcast ( assert (sort_queue_item.iovec[0].iov_len > 0); assert (sort_queue_item.iovec[0].iov_len < FRAME_SIZE_MAX); sort_queue_item.iov_len = 1; - + if (sq_lt_compare (instance->my_high_seq_received, mcast_header.seq)) { instance->my_high_seq_received = mcast_header.seq; @@ -3816,12 +3816,12 @@ static int memb_join_process ( instance->my_failed_list_entries)) { memb_consensus_set (instance, &memb_join->system_from); - + if (memb_consensus_agreed (instance) && memb_lowest_in_config (instance)) { memb_state_commit_token_create (instance, my_commit_token); - + memb_state_commit_enter (instance, my_commit_token); } else { return (0); @@ -4019,7 +4019,7 @@ static int message_handler_memb_join ( case MEMB_STATE_GATHER: memb_join_process (instance, memb_join); break; - + case MEMB_STATE_COMMIT: if (memb_set_subset (&memb_join->system_from, 1, @@ -4091,7 +4091,7 @@ static int message_handler_memb_commit_token ( memb_set_subtract (sub, &sub_entries, instance->my_proc_list, instance->my_proc_list_entries, instance->my_failed_list, instance->my_failed_list_entries); - + if (memb_set_equal (addr, memb_commit_token->addr_entries, sub, @@ -4165,12 +4165,12 @@ void main_deliver_fn ( (unsigned int)msg_len); return; } - + if ((int)message_header->type >= totemsrp_message_handlers.count) { log_printf (instance->totemsrp_log_level_security, "Type of received message is wrong... ignoring %d.\n", (int)message_header->type); return; } - + /* * Handle incoming message */ diff --git a/exec/util.c b/exec/util.c index 82f80704..2e669bba 100644 --- a/exec/util.c +++ b/exec/util.c @@ -8,7 +8,7 @@ * Author: Steven Dake (sdake@redhat.com), Mark Haverkamp (markh@osdl.org) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -52,12 +52,12 @@ LOGSYS_DECLARE_SUBSYS ("MAIN"); /* * Compare two names. returns non-zero on match. */ -int name_match(cs_name_t *name1, cs_name_t *name2) +int name_match(cs_name_t *name1, cs_name_t *name2) { if (name1->length == name2->length) { return ((strncmp ((char *)name1->value, (char *)name2->value, name1->length)) == 0); - } + } return 0; } diff --git a/exec/vsf.h b/exec/vsf.h index 61583ba3..1bd6f4cf 100644 --- a/exec/vsf.h +++ b/exec/vsf.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/exec/vsf_ykd.c b/exec/vsf_ykd.c index e3020493..bc128530 100644 --- a/exec/vsf_ykd.c +++ b/exec/vsf_ykd.c @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -166,7 +166,7 @@ static int ykd_state_send_msg (const void *context) int res; header.id = YKD_HEADER_SENDSTATE; - + iovec[0].iov_base = (char *)&header; iovec[0].iov_len = sizeof (struct ykd_header); iovec[1].iov_base = (char *)&ykd_state; @@ -193,7 +193,7 @@ static int ykd_attempt_send_msg (const void *context) int res; header.id = YKD_HEADER_SENDSTATE; - + iovec.iov_base = (char *)&header; iovec.iov_len = sizeof (struct ykd_header); @@ -297,7 +297,7 @@ static int decide (void) if (subquorum (view_list, view_list_entries, &ambiguous_sessions_max[i]) == 0) { return (0); } - + } return (1); } @@ -327,7 +327,7 @@ static void ykd_state_endian_convert (struct ykd_state *state) for (i = 0; i < state->last_formed_entries; i++) { ykd_session_endian_convert (&state->last_formed[i]); } - + for (i = 0; i < state->ambiguous_sessions_entries; i++) { ykd_session_endian_convert (&state->ambiguous_sessions[i]); } @@ -343,7 +343,7 @@ static void ykd_deliver_fn ( int state_position = 0; int i; char *msg_state = (char *)(iovec->iov_base) + sizeof (struct ykd_header); - + /* * If this is a localhost address, this node is always primary */ diff --git a/exec/wthread.c b/exec/wthread.c index 791fb425..7cd2dbc7 100644 --- a/exec/wthread.c +++ b/exec/wthread.c @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -35,7 +35,7 @@ /* * Add work to a work group and have threads process the work - * Provide blocking for all work to complete + * Provide blocking for all work to complete */ #include diff --git a/exec/wthread.h b/exec/wthread.h index 374897e9..ef89594c 100644 --- a/exec/wthread.h +++ b/exec/wthread.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/Makefile.am b/include/Makefile.am index a4c8c868..908558a4 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,13 +1,13 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, @@ -45,7 +45,7 @@ TOTEM_H = coropoll.h totem.h totemip.h totempg.h EXTRA_DIST = $(noinst_HEADERS) -noinst_HEADERS = $(CS_INTERNAL_H:%=corosync/%) +noinst_HEADERS = $(CS_INTERNAL_H:%=corosync/%) nobase_include_HEADERS = $(CS_H:%=corosync/%) $(LCR_H:%=corosync/lcr/%) \ $(ENGINE_H:%=corosync/engine/%) $(TOTEM_H:%=corosync/totem/%) diff --git a/include/corosync/cfg.h b/include/corosync/cfg.h index f50a7918..04d3dbc5 100644 --- a/include/corosync/cfg.h +++ b/include/corosync/cfg.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/coroipcc.h b/include/corosync/coroipcc.h index 2c7fc2e8..99dbf0a3 100644 --- a/include/corosync/coroipcc.h +++ b/include/corosync/coroipcc.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/corotypes.h b/include/corosync/corotypes.h index 75f45a5b..98001b24 100644 --- a/include/corosync/corotypes.h +++ b/include/corosync/corotypes.h @@ -6,7 +6,7 @@ * Author: Angus Salkeld (ahsalkeld@gmail.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/engine/config.h b/include/corosync/engine/config.h index 343c9718..e7c8deda 100644 --- a/include/corosync/engine/config.h +++ b/include/corosync/engine/config.h @@ -6,7 +6,7 @@ * Author: Patrick Caulfield (pcaulfie@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/engine/logsys.h b/include/corosync/engine/logsys.h index 7071f298..f191de2b 100644 --- a/include/corosync/engine/logsys.h +++ b/include/corosync/engine/logsys.h @@ -9,7 +9,7 @@ * All rights reserved. * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/engine/objdb.h b/include/corosync/engine/objdb.h index ce401a98..d26b6f7c 100644 --- a/include/corosync/engine/objdb.h +++ b/include/corosync/engine/objdb.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -36,7 +36,7 @@ #ifndef OBJDB_H_DEFINED #define OBJDB_H_DEFINED -#define OBJECT_PARENT_HANDLE 0xFFFFFFFF00000000ULL +#define OBJECT_PARENT_HANDLE 0xFFFFFFFF00000000ULL #include #include diff --git a/include/corosync/hdb.h b/include/corosync/hdb.h index 8d8e2cc0..25a6d8b9 100644 --- a/include/corosync/hdb.h +++ b/include/corosync/hdb.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -267,7 +267,7 @@ static inline int hdb_handle_put ( hdb_database_unlock (&handle_database->lock); return (-1); } - + handle_database->handles[handle].ref_count -= 1; assert (handle_database->handles[handle].ref_count >= 0); diff --git a/include/corosync/ipc_cfg.h b/include/corosync/ipc_cfg.h index a01bab35..9b6424d6 100644 --- a/include/corosync/ipc_cfg.h +++ b/include/corosync/ipc_cfg.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/ipc_evs.h b/include/corosync/ipc_evs.h index 5f20a6e8..3eb53396 100644 --- a/include/corosync/ipc_evs.h +++ b/include/corosync/ipc_evs.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/ipc_gen.h b/include/corosync/ipc_gen.h index 7ec9eaae..0db936c5 100644 --- a/include/corosync/ipc_gen.h +++ b/include/corosync/ipc_gen.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -106,7 +106,7 @@ static inline void swab_mar_req_header_t (mar_req_header_t *to_swab) } typedef struct { - int size; __attribute__((aligned(8))) + int size; __attribute__((aligned(8))) int id __attribute__((aligned(8))); cs_error_t error __attribute__((aligned(8))); } mar_res_header_t __attribute__((aligned(8))); diff --git a/include/corosync/ipc_pload.h b/include/corosync/ipc_pload.h index fdc3c44b..48057dae 100644 --- a/include/corosync/ipc_pload.h +++ b/include/corosync/ipc_pload.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/lcr/lcr_ifact.h b/include/corosync/lcr/lcr_ifact.h index 9124b2ba..4ae59c6e 100644 --- a/include/corosync/lcr/lcr_ifact.h +++ b/include/corosync/lcr/lcr_ifact.h @@ -2,7 +2,7 @@ * Copyright (C) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/pload.h b/include/corosync/pload.h index 78de5e09..3e34b54a 100644 --- a/include/corosync/pload.h +++ b/include/corosync/pload.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/swab.h b/include/corosync/swab.h index 2da04507..8716d602 100644 --- a/include/corosync/swab.h +++ b/include/corosync/swab.h @@ -5,7 +5,7 @@ * All rights reserved. * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/include/corosync/totem/coropoll.h b/include/corosync/totem/coropoll.h index 57edf88a..c095e404 100644 --- a/include/corosync/totem/coropoll.h +++ b/include/corosync/totem/coropoll.h @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/init/generic b/init/generic index b63a85c1..f13be6b0 100755 --- a/init/generic +++ b/init/generic @@ -31,7 +31,7 @@ internal_status() { } status() { - if + if ! internal_status then echo "Stopped" @@ -44,7 +44,7 @@ status() { start() { echo -n $"Starting Corosync Cluster Engine ($prog): " - if + if ! internal_status then echo -n "starting... " @@ -54,7 +54,7 @@ start() { sleep 2 # give it time to fail... $? isn't definitive - if + if internal_status then echo "OK" @@ -91,7 +91,7 @@ stop() { echo -n "Escalating... " killall -KILL corosync sleep 5 - + if ! internal_status then @@ -105,13 +105,13 @@ stop() { return 1 fi - while + while internal_status do sleep 1 echo -n "." done - + rm -f "$lockfile" echo "OK" return 0 diff --git a/init/mvlcge b/init/mvlcge index 059720a2..1d68ba76 100755 --- a/init/mvlcge +++ b/init/mvlcge @@ -1,21 +1,21 @@ #! /bin/sh # -# Application Interface Specification Startup +# Application Interface Specification Startup # chkconfig: 2345 20 20 PATH=/bin:/usr/bin:/sbin:/usr/sbin test -f /usr/sbin/corosync | exit 0 -case "$1" in +case "$1" in start) - echo -n "Starting Corosync Cluster Engine: " + echo -n "Starting Corosync Cluster Engine: " start-stop-daemon --start --quiet --exec /usr/sbin/corosync echo "." ;; stop) - echo -n "Stopping Corosync Cluster Engine: " + echo -n "Stopping Corosync Cluster Engine: " start-stop-daemon --stop --quiet --exec /usr/sbin/corosync echo "." ;; diff --git a/lcr/Makefile.am b/lcr/Makefile.am index 7dda46de..deb85a54 100644 --- a/lcr/Makefile.am +++ b/lcr/Makefile.am @@ -1,13 +1,13 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/lcr/README.lcr b/lcr/README.lcr index 95820691..ad782d05 100644 --- a/lcr/README.lcr +++ b/lcr/README.lcr @@ -29,7 +29,7 @@ int lcr_ifact_reference ( void **interface, void *context); -The iface_name is the name of the interface, the version is the version, +The iface_name is the name of the interface, the version is the version, the void **interface is the list of functions returned once the interface has been dynamically loaded and referenced, and context is passed to the constructor and destructor. @@ -108,6 +108,6 @@ demonstrates usage. The test_static demonstrates operation when statically linked. Note the dynamic inteface factory is still available for use when statically linking components. -On startup, a thread is created which listens for requests from the "uic" +On startup, a thread is created which listens for requests from the "uic" application. These requests are then processed by the lcr service which would execute a live replacement. diff --git a/lcr/lcr_ifact.c b/lcr/lcr_ifact.c index ce56de70..bb087d78 100644 --- a/lcr/lcr_ifact.c +++ b/lcr/lcr_ifact.c @@ -2,7 +2,7 @@ * Copyright (C) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -60,7 +60,7 @@ struct lcr_iface_instance { void *context; void (*destructor) (void *context); }; - + DECLARE_HDB_DATABASE_FIRSTRUN (lcr_component_instance_database); DECLARE_HDB_DATABASE_FIRSTRUN (lcr_iface_instance_database); @@ -186,7 +186,7 @@ static void defaults_path_build (void) if (res != NULL && (path_list[0] = strdup (cwd)) != NULL) { path_list_entries++; } - + path_list[path_list_entries++] = LCRSODIR; } diff --git a/lcr/libtest_a.c b/lcr/libtest_a.c index 65a9c939..3f5e8f23 100644 --- a/lcr/libtest_a.c +++ b/lcr/libtest_a.c @@ -2,7 +2,7 @@ * Copyright (C) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/lcr/libtest_b.c b/lcr/libtest_b.c index cdabae8b..9ef68a22 100644 --- a/lcr/libtest_b.c +++ b/lcr/libtest_b.c @@ -2,7 +2,7 @@ * Copyright (C) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/lcr/test.c b/lcr/test.c index 0c73c914..4c01ba29 100644 --- a/lcr/test.c +++ b/lcr/test.c @@ -2,7 +2,7 @@ * Copyright (C) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/lcr/uic.c b/lcr/uic.c index fb516c47..5c4b1390 100755 --- a/lcr/uic.c +++ b/lcr/uic.c @@ -2,7 +2,7 @@ * Copyright (c) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -52,7 +52,7 @@ #include #if defined(COROSYNC_LINUX) || defined(COROSYNC_SOLARIS) -/* SUN_LEN is broken for abstract namespace +/* SUN_LEN is broken for abstract namespace */ #define AIS_SUN_LEN(a) sizeof(*(a)) #else diff --git a/lcr/uis.c b/lcr/uis.c index 02ec8439..738431ec 100755 --- a/lcr/uis.c +++ b/lcr/uis.c @@ -2,7 +2,7 @@ * Copyright (c) 2006 Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -54,7 +54,7 @@ #define SERVER_BACKLOG 5 #if defined(COROSYNC_LINUX) || defined(COROSYNC_SOLARIS) -/* SUN_LEN is broken for abstract namespace +/* SUN_LEN is broken for abstract namespace */ #define AIS_SUN_LEN(a) sizeof(*(a)) #else @@ -170,11 +170,11 @@ static void *lcr_uis_server (void *data) if (nfds == 1 && ufds[0].revents & POLLIN) { ufds[1].fd = accept (ufds[0].fd, (struct sockaddr *)&un_addr, &addrlen); -#ifdef COROSYNC_LINUX +#ifdef COROSYNC_LINUX setsockopt(ufds[1].fd, SOL_SOCKET, SO_PASSCRED, &on, sizeof (on)); #endif - nfds = 2; + nfds = 2; } if (ufds[0].revents & POLLIN) { lcr_uis_dispatch (ufds[1].fd); diff --git a/lib/Makefile.am b/lib/Makefile.am index de13c9be..5b3644ab 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,14 +1,14 @@ # # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, @@ -67,7 +67,7 @@ if BUILD_DARWIN libcoroipcc.so.$(SONAME): coroipcc.o $(CC) $(LDFLAGS) $(DARWIN_OPTS) coroipcc.o -o $@ $(AM_LDFLAGS) -libconfdb.so.$(SONAME): coroipcc.o confdb.o sa-confdb.o +libconfdb.so.$(SONAME): coroipcc.o confdb.o sa-confdb.o $(CC) $(LDFLAGS) $(DARWIN_OPTS) coroipcc.o confdb.o \ sa-confdb.o ../lcr/lcr_ifact.o -o $@ -ldl $(AM_LDFLAGS) diff --git a/lib/coroipcc.c b/lib/coroipcc.c index 22254b02..ecb856cb 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c @@ -9,7 +9,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -93,7 +93,7 @@ struct ipc_segment { #if defined(COROSYNC_LINUX) -/* SUN_LEN is broken for abstract namespace +/* SUN_LEN is broken for abstract namespace */ #define AIS_SUN_LEN(a) sizeof(*(a)) #else @@ -106,7 +106,7 @@ void socket_nosigpipe(int s) int on = 1; setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, (void *)&on, sizeof(on)); } -#endif +#endif #ifndef MSG_NOSIGNAL #define MSG_NOSIGNAL 0 @@ -242,13 +242,13 @@ error_exit: return (0); } -static int +static int priv_change_send (struct ipc_segment *ipc_segment) { char buf_req; mar_req_priv_change req_priv_change; unsigned int res; - + req_priv_change.euid = geteuid(); /* * Don't resend request unless euid has changed @@ -282,7 +282,7 @@ union semun { struct seminfo *__buf; }; #endif - + static int circular_memory_map (char *path, const char *file, void **buf, size_t bytes) { @@ -292,7 +292,7 @@ circular_memory_map (char *path, const char *file, void **buf, size_t bytes) int res; sprintf (path, "/dev/shm/%s", file); - + fd = mkstemp (path); if (fd == -1) { sprintf (path, "/var/run/%s", file); @@ -306,22 +306,22 @@ circular_memory_map (char *path, const char *file, void **buf, size_t bytes) addr_orig = mmap (NULL, bytes << 1, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - + if (addr_orig == MAP_FAILED) { return (-1); } - + addr = mmap (addr_orig, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); - + if (addr != addr_orig) { return (-1); } - + addr = mmap (((char *)addr_orig) + bytes, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); - + res = close (fd); if (res) { return (-1); @@ -329,12 +329,12 @@ circular_memory_map (char *path, const char *file, void **buf, size_t bytes) *buf = addr_orig; return (0); } - + static void memory_unmap (void *addr, size_t bytes) { int res; - + res = munmap (addr, bytes); } @@ -347,7 +347,7 @@ memory_map (char *path, const char *file, void **buf, size_t bytes) int res; sprintf (path, "/dev/shm/%s", file); - + fd = mkstemp (path); if (fd == -1) { sprintf (path, "/var/run/%s", file); @@ -361,18 +361,18 @@ memory_map (char *path, const char *file, void **buf, size_t bytes) addr_orig = mmap (NULL, bytes, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - + if (addr_orig == MAP_FAILED) { return (-1); } - + addr = mmap (addr_orig, bytes, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 0); - + if (addr != addr_orig) { return (-1); } - + res = close (fd); if (res) { return (-1); @@ -380,7 +380,7 @@ memory_map (char *path, const char *file, void **buf, size_t bytes) *buf = addr_orig; return (0); } - + extern cs_error_t coroipcc_service_connect ( const char *socket_name, @@ -587,7 +587,7 @@ retry_poll: poll_events = poll (&ufds, 1, timeout); if (poll_events == -1 && errno == EINTR) { goto retry_poll; - } else + } else if (poll_events == -1) { return (-1); } else @@ -965,7 +965,7 @@ coroipcc_zcb_msg_send_reply_receive ( return (res); } - + cs_error_t saHandleCreate ( struct saHandleDatabase *handleDatabase, @@ -1069,7 +1069,7 @@ saHandleInstanceGet ( struct saHandleDatabase *handleDatabase, uint64_t inHandle, void **instance) -{ +{ uint32_t check = inHandle >> 32; uint32_t handle = inHandle & 0xffffffff; diff --git a/lib/evs.c b/lib/evs.c index 32dbfc3e..326c417f 100644 --- a/lib/evs.c +++ b/lib/evs.c @@ -232,7 +232,7 @@ evs_error_t evs_dispatch ( if (dispatch_avail == 0 && dispatch_types == EVS_DISPATCH_ALL) { break; /* exit do while cont is 1 loop */ - } else + } else if (dispatch_avail == 0) { continue; /* next dispatch event */ } @@ -325,7 +325,7 @@ evs_error_t evs_join ( return (error); } - req_lib_evs_join.header.size = sizeof (struct req_lib_evs_join) + + req_lib_evs_join.header.size = sizeof (struct req_lib_evs_join) + (group_entries * sizeof (struct evs_group)); req_lib_evs_join.header.id = MESSAGE_REQ_EVS_JOIN; req_lib_evs_join.group_entries = group_entries; @@ -334,7 +334,7 @@ evs_error_t evs_join ( iov[0].iov_len = sizeof (struct req_lib_evs_join); iov[1].iov_base = (void*) groups; /* cast away const */ iov[1].iov_len = (group_entries * sizeof (struct evs_group)); - + pthread_mutex_lock (&evs_inst->response_mutex); error = coroipcc_msg_send_reply_receive (evs_inst->ipc_ctx, iov, 2, @@ -370,7 +370,7 @@ evs_error_t evs_leave ( return (error); } - req_lib_evs_leave.header.size = sizeof (struct req_lib_evs_leave) + + req_lib_evs_leave.header.size = sizeof (struct req_lib_evs_leave) + (group_entries * sizeof (struct evs_group)); req_lib_evs_leave.header.id = MESSAGE_REQ_EVS_LEAVE; req_lib_evs_leave.group_entries = group_entries; @@ -379,7 +379,7 @@ evs_error_t evs_leave ( iov[0].iov_len = sizeof (struct req_lib_evs_leave); iov[1].iov_base = (void *) groups; /* cast away const */ iov[1].iov_len = (group_entries * sizeof (struct evs_group)); - + pthread_mutex_lock (&evs_inst->response_mutex); error = coroipcc_msg_send_reply_receive (evs_inst->ipc_ctx, iov, 2, @@ -432,7 +432,7 @@ evs_error_t evs_mcast_joined ( iov[0].iov_base = &req_lib_evs_mcast_joined; iov[0].iov_len = sizeof (struct req_lib_evs_mcast_joined); memcpy (&iov[1], iovec, iov_len * sizeof (struct iovec)); - + pthread_mutex_lock (&evs_inst->response_mutex); error = coroipcc_msg_send_reply_receive (evs_inst->ipc_ctx, iov, @@ -477,7 +477,7 @@ evs_error_t evs_mcast_groups ( for (i = 0; i < iov_len; i++) { msg_len += iovec[i].iov_len; } - req_lib_evs_mcast_groups.header.size = sizeof (struct req_lib_evs_mcast_groups) + + req_lib_evs_mcast_groups.header.size = sizeof (struct req_lib_evs_mcast_groups) + (group_entries * sizeof (struct evs_group)) + msg_len; req_lib_evs_mcast_groups.header.id = MESSAGE_REQ_EVS_MCAST_GROUPS; req_lib_evs_mcast_groups.guarantee = guarantee; @@ -489,7 +489,7 @@ evs_error_t evs_mcast_groups ( iov[1].iov_base = (void *) groups; /* cast away const */ iov[1].iov_len = (group_entries * sizeof (struct evs_group)); memcpy (&iov[2], iovec, iov_len * sizeof (struct iovec)); - + pthread_mutex_lock (&evs_inst->response_mutex); error = coroipcc_msg_send_reply_receive (evs_inst->ipc_ctx, iov, @@ -558,7 +558,7 @@ evs_error_t evs_membership_get ( *member_list_entries = MIN (*member_list_entries, res_lib_evs_membership_get.member_list_entries); if (member_list) { - memcpy (member_list, &res_lib_evs_membership_get.member_list, + memcpy (member_list, &res_lib_evs_membership_get.member_list, *member_list_entries * sizeof (struct in_addr)); } diff --git a/lib/libcfg.versions b/lib/libcfg.versions index 1549d767..3a49d820 100644 --- a/lib/libcfg.versions +++ b/lib/libcfg.versions @@ -14,8 +14,8 @@ COROSYNC_CFG_0.82 { corosync_cfg_ring_reenable; corosync_cfg_service_load; corosync_cfg_service_unload; - - + + local: coroipcc_service_connect; coroipcc_service_disconnect; diff --git a/lib/libquorum.versions b/lib/libquorum.versions index 76e22406..4a7cb341 100644 --- a/lib/libquorum.versions +++ b/lib/libquorum.versions @@ -1,7 +1,7 @@ # Version and symbol export for libquorum.so COROSYNC_QUORUM_1.0 { - global: + global: quorum_initialize; quorum_finalize; quorum_getquorate; diff --git a/lib/libvotequorum.versions b/lib/libvotequorum.versions index 101a039c..bba4c4bd 100644 --- a/lib/libvotequorum.versions +++ b/lib/libvotequorum.versions @@ -1,7 +1,7 @@ # Version and symbol export for libvotequorum.so COROSYNC_VOTEQUORUM_1.0 { - global: + global: votequorum_initialize; votequorum_finalize; votequorum_getinfo; diff --git a/lib/pload.c b/lib/pload.c index b04eb949..82474b5b 100644 --- a/lib/pload.c +++ b/lib/pload.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -175,7 +175,7 @@ unsigned int pload_fd_get ( return (error); } - *fd = coroipcc_fd_get (pload_inst->ipc_ctx); + *fd = coroipcc_fd_get (pload_inst->ipc_ctx); (void)saHandleInstancePut (&pload_handle_t_db, handle); @@ -207,7 +207,7 @@ unsigned int pload_start ( iov.iov_base = (char *)&req_lib_pload_start; iov.iov_len = sizeof (struct req_lib_pload_start); - + pthread_mutex_lock (&pload_inst->response_mutex); error = coroipcc_msg_send_reply_receive(pload_inst->ipc_ctx, diff --git a/lib/util.h b/lib/util.h index 63a1bf30..a3b948d3 100644 --- a/lib/util.h +++ b/lib/util.h @@ -7,7 +7,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -49,7 +49,7 @@ #else #define DPRINT(s) #endif - + #ifdef SO_NOSIGPIPE #ifndef MSG_NOSIGNAL #define MSG_NOSIGNAL 0 diff --git a/man/Makefile.am b/man/Makefile.am index c1c9ce3d..685feda4 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -3,14 +3,14 @@ # # Authors: Steven Dake (sdake@redhat.com) # Fabio M. Di Nitto (fdinitto@redhat.com) -# +# # All rights reserved. -# +# # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/man/confdb_dispatch.3 b/man/confdb_dispatch.3 index b8491e54..748bc2c4 100644 --- a/man/confdb_dispatch.3 +++ b/man/confdb_dispatch.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to dispatch configuration changes. .PP Each application may have several connections to the CONFDB API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. .PP @@ -95,15 +95,15 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_fd_get.3 b/man/confdb_fd_get.3 index 0b826db5..c9e88834 100644 --- a/man/confdb_fd_get.3 +++ b/man/confdb_fd_get.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -64,14 +64,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_finalize.3 b/man/confdb_finalize.3 index d6cf46eb..2246cb4c 100644 --- a/man/confdb_finalize.3 +++ b/man/confdb_finalize.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -60,15 +60,15 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_initialize.3 b/man/confdb_initialize.3 index 9099a791..14541c86 100644 --- a/man/confdb_initialize.3 +++ b/man/confdb_initialize.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to initialize a connection to the configuration database API. .PP Each application may have several connections to the CONFDB API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. The .I handle @@ -97,7 +97,7 @@ typedef struct { When a configuration change occurs, the callback is called from the .B confdb_dispatch() -function. +function. .PP .SH RETURN VALUE This call returns the CONFDB_OK value if successful, otherwise an error is returned. diff --git a/man/confdb_key_create.3 b/man/confdb_key_create.3 index 05151c5f..afa7eeeb 100644 --- a/man/confdb_key_create.3 +++ b/man/confdb_key_create.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -73,14 +73,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_key_delete.3 b/man/confdb_key_delete.3 index 1aa6461e..06ecdb72 100644 --- a/man/confdb_key_delete.3 +++ b/man/confdb_key_delete.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -69,14 +69,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_key_iter.3 b/man/confdb_key_iter.3 index 6ee3cfaf..cce1ed32 100644 --- a/man/confdb_key_iter.3 +++ b/man/confdb_key_iter.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,13 +44,13 @@ confdb_key_iter \- Iterate through key/value pairs in the Configuration Database .SH DESCRIPTION The .B confdb_key_iter -function repeatedly returns all key/value pairs that are subobjects of the specified parent. You must call +function repeatedly returns all key/value pairs that are subobjects of the specified parent. You must call .B confdb_key_iter_start first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to .B confdb_key_iter will return the first key/value in the list. Subsequent calls will return any remaining keys. The function returns CONFDB_ERR_ACCESS when the all of the matching keys have been seen. .BR -The library holds a seperate context for each parent object, so you can call confdb_key_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with +The library holds a seperate context for each parent object, so you can call confdb_key_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with .B confdb_object_find or .B confdb_object_iter @@ -69,14 +69,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_key_replace.3 b/man/confdb_key_replace.3 index 19371441..ef6e5c22 100644 --- a/man/confdb_key_replace.3 +++ b/man/confdb_key_replace.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -54,7 +54,7 @@ unique in the database, so a value is not enough to uniqely identify a key belon to a particular parent object. .BR Strictly, even give the key name and value is not enough to uniquely identify a key, -If there are two (or more) keys with the same name and value, only the first will have +If there are two (or more) keys with the same name and value, only the first will have its value changed . .SH RETURN VALUE This call returns the CONFDB_OK value if successful, otherwise an error is returned. @@ -69,14 +69,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_object_create.3 b/man/confdb_object_create.3 index 021b2837..37f10917 100644 --- a/man/confdb_object_create.3 +++ b/man/confdb_object_create.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -53,11 +53,11 @@ On success the handle of the new object is returned in This value should be used to refer to the object in future, eg when retrieving sub-keys or if the object is destroyed. .B parent_object_handle -is the handle of the object that is the parent of the new object. This can be +is the handle of the object that is the parent of the new object. This can be .B OBJECT_PARENT_HANDLE if the new object is to be a child of the top-level object. .BR -Object names are not required to be unique in the database. If you call +Object names are not required to be unique in the database. If you call .B confdb_object_create twice with the same parameters you will create two different objects with the same name but distinct object handles. You can iterate through similarly name objects using the @@ -76,14 +76,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_object_destroy.3 b/man/confdb_object_destroy.3 index 52d14e9b..92754043 100644 --- a/man/confdb_object_destroy.3 +++ b/man/confdb_object_destroy.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -40,17 +40,17 @@ confdb_object_destroy \- Remove an object from the Configuration Database .BI "confdb_error_t confdb_destroy(confdb_handle_t " handle ", unsigned int " object_handle "); .SH DESCRIPTION The -.B confdb_object_destroy +.B confdb_object_destroy call removes an object from the configuration database. It also remove all subkeys and all -subobjects in the database, so be VERY CAREFUL!. +subobjects in the database, so be VERY CAREFUL!. .BR -The input value +The input value .B object_handle -is the handle of the object to remove, this can be got from the +is the handle of the object to remove, this can be got from the .B confdb_object_find -or +or .B confdb_object_iter -calls or +calls or .B confdb_object_create calls. .SH RETURN VALUE @@ -66,14 +66,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_object_find.3 b/man/confdb_object_find.3 index b049f2ba..7afa937b 100644 --- a/man/confdb_object_find.3 +++ b/man/confdb_object_find.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -46,24 +46,24 @@ confdb_object_find \- Find a named object in the Configuration Database .SH DESCRIPTION The .B confdb_object_find -function repeatedly returns objects that match a given name. You must call +function repeatedly returns objects that match a given name. You must call .B confdb_object_find_start first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to .B confdb_object_find will return the handle of the first object that matches the passed in name. Subsequent calls will return any remaining objects with the same name. The function returns CONFDB_ERR_ACCESS when the all of the matching objects have been seen. .BR -You need to provide the same object name and length for each call to +You need to provide the same object name and length for each call to .B confdb_object_find, If you change either of then, the results are undefined. .BR -The library holds a seperate context for each parent object, so you can call confdb_object_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with +The library holds a seperate context for each parent object, so you can call confdb_object_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with .B confdb_object_iter or .B confdb_key_iter calls on the same parent object. .BR -.B When you have finished searching for objects, call the +.B When you have finished searching for objects, call the .B confdb_object_find_destroy library call to free up memory associated with the search context. .SH RETURN VALUE @@ -79,14 +79,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_object_iter.3 b/man/confdb_object_iter.3 index 9be7ee30..188d756c 100644 --- a/man/confdb_object_iter.3 +++ b/man/confdb_object_iter.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -46,14 +46,14 @@ confdb_object_iter \- Iterate through objects in the Configuration Database .SH DESCRIPTION The .B confdb_object_iter -function repeatedly returns all objects that are subobjects of the specified parent. You must call +function repeatedly returns all objects that are subobjects of the specified parent. You must call .B confdb_object_iter_start first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to .B confdb_object_iter will return the handle of the first object in the list. Subsequent calls will return any remaining objects. The function returns CONFDB_ERR_ACCESS when the all of the matching objects have been seen. The function returns the name and length of the object as well as its handle. .BR -.B When you have finished searching for objects, call the +.B When you have finished searching for objects, call the .B confdb_object_iter_destroy library call to free up memory associated with the search context. .BR @@ -71,14 +71,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_object_parent_get.3 b/man/confdb_object_parent_get.3 index ce48e71a..f626248a 100644 --- a/man/confdb_object_parent_get.3 +++ b/man/confdb_object_parent_get.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -42,7 +42,7 @@ confdb_parent_get \- Configuration Database Object Parent The .B confdb_object_parent_get returns the parent object handle of already known object. -.B object_handle +.B object_handle is the handle of an existing object .B parent_object_handle returns the handle of its parent. @@ -59,14 +59,14 @@ The errors are undocumented. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/confdb_overview.8 b/man/confdb_overview.8 index 61041428..b787e06f 100644 --- a/man/confdb_overview.8 +++ b/man/confdb_overview.8 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -64,14 +64,14 @@ This software is not yet production, so there may still be some bugs. .BR confdb_object_create (3), .BR confdb_object_destroy (3), .BR confdb_object_parent_get (3), -.BR confdb_key_create (3), -.BR confdb_key_delete (3), +.BR confdb_key_create (3), +.BR confdb_key_delete (3), .BR confdb_key_get (3), .BR confdb_key_replace (3), .BR confdb_object_find_start (3), .BR confdb_object_find (3), -.BR confdb_object_iter_start (3), -.BR confdb_object_iter (3), -.BR confdb_key_iter_start (3), -.BR confdb_key_iter (3), +.BR confdb_object_iter_start (3), +.BR confdb_object_iter (3), +.BR confdb_key_iter_start (3), +.BR confdb_key_iter (3), .PP diff --git a/man/coroipc_overview.8 b/man/coroipc_overview.8 index 3d751a65..bd47bba9 100644 --- a/man/coroipc_overview.8 +++ b/man/coroipc_overview.8 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -117,9 +117,9 @@ communication. To disconnect, the client either exits or executes the function coroipcc_service_disconnect(3). .SH Synchronous communication -There are two functions for sending a request and receiving a response. The +There are two functions for sending a request and receiving a response. The first function coroipcc_msg_send_reply_receive(3) sends an iovector request -and receives a response. This function copies the response into the response +and receives a response. This function copies the response into the response buffer. the second function coroipcc_msg_end_reply_receive_in_buf(3) does not copy the response buffer and allows for zero-copy reading of the response when the lifetime of the response buffer is known. diff --git a/man/corosync-objctl.8 b/man/corosync-objctl.8 index 250a99c5..b83e172f 100644 --- a/man/corosync-objctl.8 +++ b/man/corosync-objctl.8 @@ -6,7 +6,7 @@ .\" * Author: Angus Salkeld (angus.salkeld@alliedtelesis.co.nz) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/corosync.conf.5 b/man/corosync.conf.5 index 770fe9a3..1e44007d 100644 --- a/man/corosync.conf.5 +++ b/man/corosync.conf.5 @@ -7,7 +7,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -61,13 +61,13 @@ This top level directive contains configuration options for user privilegies. .PP .PP -Within the +Within the .B totem directive, an interface directive is required. There is also one configuration option which is required: .PP .PP -Within the +Within the .B interface sub-directive of totem there are four parameters which are required: @@ -108,8 +108,8 @@ UDP ports. .PP .PP -Within the -.B totem +Within the +.B totem directive, there are seven configuration options of which one is required, five are optional, and one is required when IPV6 is configured in the interface subdirective. The required directive controls the version of the totem @@ -184,13 +184,13 @@ Please note while some NICs or switches claim large frame support, they support 9000 MTU as the maximum frame size including the IP header. Setting the netmtu and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame. Then Linux will add a 18 byte header moving the full frame size to 9018. As a -result some hardware will not operate properly with this size of data. A netmtu +result some hardware will not operate properly with this size of data. A netmtu of 8982 seems to work for the few large frame devices that have been tested. Some manufacturers claim large frame support when in fact they support frame sizes of 4500 bytes. Increasing the MTU from 1500 to 8982 doubles throughput performance from 30MB/sec -to 60MB/sec as measured with evsbench with 175000 byte messages with the secauth +to 60MB/sec as measured with evsbench with 175000 byte messages with the secauth directive set to off. When sending multicast traffic, if the network frequently reconfigures, chances are @@ -208,7 +208,7 @@ If secauth is on, this directive allows systems to be configured to use multiple threads to encrypt and send multicast messages. A thread directive of 0 indicates that no threaded send should be used. This -mode offers best performance for non-SMP systems. +mode offers best performance for non-SMP systems. The default is 0. @@ -217,15 +217,15 @@ vsftype This directive controls the virtual synchrony filter type used to identify a primary component. The preferred choice is YKD dynamic linear voting, however, for clusters larger then 32 nodes YKD consumes alot of memory. For -large scale clusters that are created by changing the MAX_PROCESSORS_COUNT +large scale clusters that are created by changing the MAX_PROCESSORS_COUNT #define in the C code totem.h file, the virtual synchrony filter "none" is recommended but then AMF and DLCK services (which are currently experimental) are not safe for use. The default is ykd. The vsftype can also be set to none. -Within the -.B totem +Within the +.B totem directive, there are several configuration options which are used to control the operation of the protocol. It is generally not recommended to change any of these values without proper guidance and sufficient testing. Some networks @@ -269,7 +269,7 @@ The default is 4 retransmissions. .TP join -This timeout specifies in milliseconds how long to wait for join messages in +This timeout specifies in milliseconds how long to wait for join messages in the membership protocol. The default is 100 milliseconds. @@ -328,10 +328,10 @@ The default is 30 rotations. heartbeat_failures_allowed [HeartBeating mechanism] Configures the optional HeartBeating mechanism for faster failure detection. Keep in -mind that engaging this mechanism in lossy networks could cause faulty loss declaration -as the mechanism relies on the network for heartbeating. +mind that engaging this mechanism in lossy networks could cause faulty loss declaration +as the mechanism relies on the network for heartbeating. -So as a rule of thumb use this mechanism if you require improved failure in low to +So as a rule of thumb use this mechanism if you require improved failure in low to medium utilized networks. This constant specifies the number of heartbeat failures the system should tolerate @@ -409,7 +409,7 @@ override this value without guidance from the corosync community. The default is 47 milliseconds. .PP -Within the +Within the .B logging directive, there are several configuration options which are all optional. @@ -454,7 +454,7 @@ The default is syslog and stderr. .TP logfile -If the +If the .B to_logfile directive is set to .B yes @@ -469,11 +469,11 @@ Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, The default is: info. -.TP +.TP syslog_facility This specifies the syslog facility type that will be used for any messages -sent to syslog. options are daemon, local0, local1, local2, local3, local4, -local5, local6 & local7. +sent to syslog. options are daemon, local0, local1, local2, local3, local4, +local5, local6 & local7. The default is daemon. @@ -503,12 +503,12 @@ enter|leave|trace1|trace2|trace3|... The default is none. .PP -Within the +Within the .B logging directive, logger_subsys directives are optional. .PP -Within the +Within the .B logger_subsys sub-directive, all of the above logging configuration options are valid and can be used to override the default settings. diff --git a/man/corosync_overview.8 b/man/corosync_overview.8 index 07a0ba1f..69c5bdc7 100644 --- a/man/corosync_overview.8 +++ b/man/corosync_overview.8 @@ -7,7 +7,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -76,7 +76,7 @@ processes or nodes, a mechanism must exist for them to communicate. This mechanism is provided by two services. The event service provides a publish/subscribe model for events. The messaging service provides end to end messaging. Finally a mechanism to synchronize access is -provided by the distributed lock service. +provided by the distributed lock service. The corosync project also provides a group messaging toolkit called EVS. The EVS service implements a messaging model known as Extended Virtual @@ -144,7 +144,7 @@ reference the AIS interfaces. The corosync project recommends to distros to place include files in /usr/include/corosync. The following include lines must be added to -the application to use each of the following services: +the application to use each of the following services: #include For the Cluster Membership B.01.01 service. .PP @@ -257,7 +257,7 @@ be setuid or setgid in the filesystem. .SH SAFTEST COMPLIANCE The corosync libraries are now nearly compliant with every aspect of the SA Forum's AIS specification. The AMF service, however, is not compliant with the -B.01.01 specification. The remaining services pass most of the tests of the +B.01.01 specification. The remaining services pass most of the tests of the saftest suite against the B.01.01 specification. .SH BUGS diff --git a/man/cpg_context_get.3 b/man/cpg_context_get.3 index a843a925..d60617a0 100644 --- a/man/cpg_context_get.3 +++ b/man/cpg_context_get.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_context_set.3 b/man/cpg_context_set.3 index e8752bd0..9cf2f8d4 100644 --- a/man/cpg_context_set.3 +++ b/man/cpg_context_set.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_dispatch.3 b/man/cpg_dispatch.3 index 306e9363..439ecc58 100644 --- a/man/cpg_dispatch.3 +++ b/man/cpg_dispatch.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -45,7 +45,7 @@ function is used to dispatch configuration changes or messages from the closed process groups API. .PP Each application may have several connections to the CPG API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. .PP diff --git a/man/cpg_fd_get.3 b/man/cpg_fd_get.3 index a5940173..365d611e 100644 --- a/man/cpg_fd_get.3 +++ b/man/cpg_fd_get.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_finalize.3 b/man/cpg_finalize.3 index 39391b64..4b7ca9c9 100644 --- a/man/cpg_finalize.3 +++ b/man/cpg_finalize.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_initialize.3 b/man/cpg_initialize.3 index 3d764c02..91355e79 100644 --- a/man/cpg_initialize.3 +++ b/man/cpg_initialize.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to initialize a connection to the closed process groups API. .PP Each application may have several connections to the CPG API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. The .I handle @@ -120,7 +120,7 @@ is called. The .I cpg_address -structure is defined +structure is defined .IP .RS .ne 18 diff --git a/man/cpg_join.3 b/man/cpg_join.3 index bfe67b7a..92187fc8 100644 --- a/man/cpg_join.3 +++ b/man/cpg_join.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to join one group. When a group is joined, using the .B cpg_mcast_joined(3) function will multicast to the groups joined in the argument -.I handle. +.I handle. The process will also get notifications of other processes joining and leaving the group. Messages that are sent to any of the groups joined to the parameter @@ -57,14 +57,14 @@ the process will start to receive callbacks relating to messages send from membe of the group or notifications of process joining/leaving the group. .PP Note that more than one process can join a CPG group and each will receive its -own copy of any messages sent using +own copy of any messages sent using .I cpg_mcast_joined() and its own confchg callback. .PP The argument .I group -is used to specify the group to join. +is used to specify the group to join. The diff --git a/man/cpg_leave.3 b/man/cpg_leave.3 index 47b0de26..8fbfc429 100644 --- a/man/cpg_leave.3 +++ b/man/cpg_leave.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -42,7 +42,7 @@ cpg_leave \- Leave a group in the CPG library The .B cpg_leave function is used to leave a group. Once a group has been left the process will -no longer receive messages or notifications about events in that group. NOTE: that a group is +no longer receive messages or notifications about events in that group. NOTE: that a group is only deemed to have left the group once it has been notified (by its confchg callback) that is has left. So expect to receive at least one confchg callback after calling this function. diff --git a/man/cpg_local_get.3 b/man/cpg_local_get.3 index 4ec8ecdf..5152e9fb 100644 --- a/man/cpg_local_get.3 +++ b/man/cpg_local_get.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -46,7 +46,7 @@ function is used to determine the local processor's identifier. The argument .I handle is used to reference the cpg instantiation. -The argument +The argument .I local_nodeid will return the 32 bit node id. .PP diff --git a/man/cpg_mcast_joined.3 b/man/cpg_mcast_joined.3 index 42e0c882..8fc3daf9 100644 --- a/man/cpg_mcast_joined.3 +++ b/man/cpg_mcast_joined.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -73,7 +73,7 @@ typedef enum { The meanings of the cpg_guarantee_t typedef are: .TP .B CPG_TYPE_UNORDERED -Messages are guaranteed to be delivered, but with no particular order. This +Messages are guaranteed to be delivered, but with no particular order. This mode is unimplemented in the CPG library. .TP .B CPG_TYPE_FIFO @@ -114,7 +114,7 @@ The .I iov_len argument describes the number of entires in the .I iovec -argument. +argument. .SH RETURN VALUE This call returns the CPG_OK value if successful, otherwise an error is returned. diff --git a/man/cpg_membership_get.3 b/man/cpg_membership_get.3 index d9aa782a..997f6698 100644 --- a/man/cpg_membership_get.3 +++ b/man/cpg_membership_get.3 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -48,7 +48,7 @@ the cpg_join() function containing your process. The argument .I handle is used to reference the cpg instantiation. -The argument +The argument .I groupName will return the name of the group The argument diff --git a/man/cpg_overview.8 b/man/cpg_overview.8 index 354d8e88..9742752c 100644 --- a/man/cpg_overview.8 +++ b/man/cpg_overview.8 @@ -6,7 +6,7 @@ .\" * Author: Patrick Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_zcb_alloc.3 b/man/cpg_zcb_alloc.3 index 9e94768d..5ee0f8d9 100644 --- a/man/cpg_zcb_alloc.3 +++ b/man/cpg_zcb_alloc.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_zcb_free.3 b/man/cpg_zcb_free.3 index daae971e..48f99f25 100644 --- a/man/cpg_zcb_free.3 +++ b/man/cpg_zcb_free.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/cpg_zcb_mcast_joined.3 b/man/cpg_zcb_mcast_joined.3 index ca553023..57c71b8e 100644 --- a/man/cpg_zcb_mcast_joined.3 +++ b/man/cpg_zcb_mcast_joined.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -74,7 +74,7 @@ typedef enum { The meanings of the cpg_guarantee_t typedef are: .TP .B CPG_TYPE_UNORDERED -Messages are guaranteed to be delivered, but with no particular order. This +Messages are guaranteed to be delivered, but with no particular order. This mode is unimplemented in the CPG library. .TP .B CPG_TYPE_FIFO @@ -94,7 +94,7 @@ unimplemented in the CPG library. The .I msg argument describes the zero copy buffer which is used to transmit a message. -this buffer must be allocated by +this buffer must be allocated by .B cpg_zcb_alloc(3). .PP diff --git a/man/evs_dispatch.3 b/man/evs_dispatch.3 index f36f55dd..4967725c 100644 --- a/man/evs_dispatch.3 +++ b/man/evs_dispatch.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -45,7 +45,7 @@ function is used to dispatch configuration changes or messages from the extended virtual synchrony API. .PP Each application may have several connections to the EVS API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. .PP diff --git a/man/evs_fd_get.3 b/man/evs_fd_get.3 index b88450e2..5ed6f8a9 100644 --- a/man/evs_fd_get.3 +++ b/man/evs_fd_get.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/evs_finalize.3 b/man/evs_finalize.3 index 75cc34b4..57fe2d20 100644 --- a/man/evs_finalize.3 +++ b/man/evs_finalize.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/evs_initialize.3 b/man/evs_initialize.3 index ac75bb48..69a719d1 100644 --- a/man/evs_initialize.3 +++ b/man/evs_initialize.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to initialize a connection to the extended virtual synchrony API. .PP Each application may have several connections to the EVS API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. The .I handle @@ -103,7 +103,7 @@ is called. The .I evs_address -structure is defined +structure is defined .IP .RS .ne 18 diff --git a/man/evs_join.3 b/man/evs_join.3 index 9f5bed64..7a88a880 100644 --- a/man/evs_join.3 +++ b/man/evs_join.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/evs_leave.3 b/man/evs_leave.3 index 76df8dbc..750b6820 100644 --- a/man/evs_leave.3 +++ b/man/evs_leave.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -41,7 +41,7 @@ evs_leave \- Leave one or more groups in the EVS library .SH DESCRIPTION The .B evs_leave -function is used to leave one or more groups. The joined groups are used with +function is used to leave one or more groups. The joined groups are used with .B evs_mcast_joined(3) function to multicast to the groups joined in the argument .I handle. diff --git a/man/evs_mcast_groups.3 b/man/evs_mcast_groups.3 index f3d28f9c..1e68f84b 100644 --- a/man/evs_mcast_groups.3 +++ b/man/evs_mcast_groups.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -76,7 +76,7 @@ typedef enum { The meanings of the evs_guarantee_t typedef are: .TP .B EVS_GUARANTEE_UNORDERED -Messages are guaranteed to be delivered, but with no particular order. This +Messages are guaranteed to be delivered, but with no particular order. This mode is unimplemented in the EVS library. .TP .B EVS_GUARANTEE_FIFO @@ -142,7 +142,7 @@ The .I iovlen argument describes the number of entires in the .I iovec -argument. +argument. .SH RETURN VALUE This call returns the EVS_OK value if successful, otherwise an error is returned. diff --git a/man/evs_mcast_joined.3 b/man/evs_mcast_joined.3 index a685e8b1..d9ba7322 100644 --- a/man/evs_mcast_joined.3 +++ b/man/evs_mcast_joined.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -74,7 +74,7 @@ typedef enum { The meanings of the evs_guarantee_t typedef are: .TP .B EVS_GUARANTEE_UNORDERED -Messages are guaranteed to be delivered, but with no particular order. This +Messages are guaranteed to be delivered, but with no particular order. This mode is unimplemented in the EVS library. .TP .B EVS_GUARANTEE_FIFO @@ -115,7 +115,7 @@ The .I iovlen argument describes the number of entires in the .I iovec -argument. +argument. .SH RETURN VALUE This call returns the EVS_OK value if successful, otherwise an error is returned. diff --git a/man/evs_membership_get.3 b/man/evs_membership_get.3 index a15872c9..d7adf5cb 100644 --- a/man/evs_membership_get.3 +++ b/man/evs_membership_get.3 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -46,7 +46,7 @@ the local processor identifier. The argument .I handle is used to reference the evs instantiation. -The argument +The argument .I local_addr will return the local address of the processor. The argument diff --git a/man/evs_overview.8 b/man/evs_overview.8 index 581ecd3f..cb239da6 100644 --- a/man/evs_overview.8 +++ b/man/evs_overview.8 @@ -6,7 +6,7 @@ .\" * Author: Steven Dake (sdake@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -105,7 +105,7 @@ transmission media. This allows optimiziations when every processor must receiv of the message for replication. .PP All messages are ordered according to agreed ordering. This mechanism allows the avoidance -of race conditions. Consider a lock service implemented over several processors. Two +of race conditions. Consider a lock service implemented over several processors. Two requests occur at the same time on two seperate processors. The requests are ordered for every processor in the same order and delivered to the processors. Then all processors will get request A before request B and can reject request B. Any type of creation or diff --git a/man/index.html b/man/index.html index 755b3ba8..a4eb897f 100644 --- a/man/index.html +++ b/man/index.html @@ -17,7 +17,7 @@

Welcome to the corosync project's manual pages.

- corosync_overview(8): + corosync_overview(8): Overview of the corosync system.
@@ -25,16 +25,16 @@ Description of configuration options for corosync.
- evs_overview(8): + evs_overview(8): Overview of the evs extended virtual synchrony group - communication toolkit. + communication toolkit.
evs_initialize(3): Description of the evs_initialize interface.
- evs_finalize(3): + evs_finalize(3): Description of the evs_finalize interface.
@@ -69,7 +69,7 @@ cpg_overview(8): Overview of the cpg extended virtual synchrony group - communication toolkit. + communication toolkit.
cpg_initialize(3): diff --git a/man/logsys_overview.8 b/man/logsys_overview.8 index 1358d10c..e39837a6 100644 --- a/man/logsys_overview.8 +++ b/man/logsys_overview.8 @@ -7,7 +7,7 @@ .\" * Author: Fabio M. Di Nitto (fdinitto@redhat.com) .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -85,7 +85,7 @@ If this flag is not specified, the logging operations are blocking. The debug parameter, if enabled, turns off all messages priority filtering, recording everything everywhere. -The file parameter specifies the filename that should be used to log messages. +The file parameter specifies the filename that should be used to log messages. This parameter may be NULL and no log file will be created. The file_priority parameter specifies the message priority that should be logged to file. @@ -136,7 +136,7 @@ An example: LOGSYS_DECLARE_SUBSYS ("subsystest"); -It is possible to use the same subsystem name in separate object files. +It is possible to use the same subsystem name in separate object files. In this case, the individual logging parameters for those subsystem identifier will be used. @@ -172,7 +172,7 @@ ENTER_VOID(); LEAVE_VOID(); } -An example of using ENTER is +An example of using ENTER is void function (char *name) { ENTER ("The name is %s\n", name); ... function contents ... diff --git a/man/votequorum_dispatch.3 b/man/votequorum_dispatch.3 index e13aab67..c9e91f55 100644 --- a/man/votequorum_dispatch.3 +++ b/man/votequorum_dispatch.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to dispatch configuration changes. .PP Each application may have several connections to the votequorum API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. .PP diff --git a/man/votequorum_fd_get.3 b/man/votequorum_fd_get.3 index 6dcc833e..2687bc3b 100644 --- a/man/votequorum_fd_get.3 +++ b/man/votequorum_fd_get.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/votequorum_finalize.3 b/man/votequorum_finalize.3 index 0fbc3e0d..c58aa892 100644 --- a/man/votequorum_finalize.3 +++ b/man/votequorum_finalize.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/votequorum_getinfo.3 b/man/votequorum_getinfo.3 index 7a06e636..99517e17 100644 --- a/man/votequorum_getinfo.3 +++ b/man/votequorum_getinfo.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -41,7 +41,7 @@ votequorum_getinfo \- Get information about the VoteQuorum service .SH DESCRIPTION The .B votequorum_getinfo -function is used to get information about the voteing system and its nodes. +function is used to get information about the voteing system and its nodes. The votequorum_info structure is defined as follows: .PP diff --git a/man/votequorum_initialize.3 b/man/votequorum_initialize.3 index 2ea1c7fd..55548ebc 100644 --- a/man/votequorum_initialize.3 +++ b/man/votequorum_initialize.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -44,7 +44,7 @@ The function is used to initialize a connection to the vote-based quorum database API. .PP Each application may have several connections to the votequorum API. Each application -uses the +uses the .I handle argument to uniquely identify the connection. The .I handle @@ -88,7 +88,7 @@ typedef struct { When a configuration change occurs, the callback is called from the .B votequorum_dispatch() -function. +function. .PP .SH RETURN VALUE This call returns the CS_OK value if successful, otherwise an error is returned. diff --git a/man/votequorum_leaving.3 b/man/votequorum_leaving.3 index 26aff114..ad7bda4a 100644 --- a/man/votequorum_leaving.3 +++ b/man/votequorum_leaving.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -46,7 +46,7 @@ will (when the node actually leaves) reduce quorum to keep the cluster running w this node. .PP This function should only be called if it is known that the node is being shut down for -a known reason and could be out of the cluster for an extended period of time. +a known reason and could be out of the cluster for an extended period of time. .PP Normal behaviour is for the cluster to reduce the total number of votes, but NOT expected_votes when a node leave the cluster, so the cluster could become inquorate. This is correct behaviour diff --git a/man/votequorum_overview.8 b/man/votequorum_overview.8 index 689e6318..b27e7aa9 100644 --- a/man/votequorum_overview.8 +++ b/man/votequorum_overview.8 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -33,7 +33,7 @@ .\" */ .TH VOTEQUORUM_OVERVIEW 8 2009-01-26 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual" .SH OVERVIEW -The votequuorum library is delivered with the corosync project. It is the external interface to +The votequuorum library is delivered with the corosync project. It is the external interface to the vote-based quorum service. This service is optionally loaded into all ndes in a corosync cluster to avoid split-brain situations. It does this by having a number of votes assigned to each system in the cluster and ensuring that only when a majority of the votes are present, cluster operations are @@ -52,7 +52,7 @@ The library provides a mechanism to: .PP * Connect an additional quorum device to allow small clusters to remain quorate during node outages. .PP -.B votequorum +.B votequorum reads its configuration from the objdb. The following keys are read when it starts up: .PP * quorum.expected_votes @@ -66,7 +66,7 @@ reads its configuration from the objdb. The following keys are read when it star * quorum.two_node .PP Most of those values can be changed while corosync is running with the following exceptions: -.B quorum.disallowed +.B quorum.disallowed cannot be changed, and .B two_node cannot be set on-the-fly, though it can be cleared. ie you can start with two nodes in the cluster diff --git a/man/votequorum_qdisk_getinfo.3 b/man/votequorum_qdisk_getinfo.3 index 10ee74d5..c3f1c535 100644 --- a/man/votequorum_qdisk_getinfo.3 +++ b/man/votequorum_qdisk_getinfo.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/votequorum_qdisk_poll.3 b/man/votequorum_qdisk_poll.3 index 52a9dd04..54780db5 100644 --- a/man/votequorum_qdisk_poll.3 +++ b/man/votequorum_qdisk_poll.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -42,13 +42,13 @@ votequorum_qdisk_poll \- Tells votequorum the result of the quorum device poll The .B votequorum_qdisk_poll is called by the quorum device subsyetem (not provided as part of votequorum) to tell -the voting system if the qurum device is present/active or not. If +the voting system if the qurum device is present/active or not. If .B state is 1 then the votes for the device are included in the quorum calculation, otherwise not. This routine should be called at regular intervals to ensure that the device status -is always known to votequorum. If +is always known to votequorum. If .B votequorum_qdisk_poll -is not called after (default) 10 seconds then the device will be deeded to be dead and +is not called after (default) 10 seconds then the device will be deeded to be dead and its votes removed from the cluster. This does not unregister the device. The default poll time can be changed by setting the object database variable quorum.quorumdev_poll. diff --git a/man/votequorum_qdisk_register.3 b/man/votequorum_qdisk_register.3 index 20a067e9..a19c2f60 100644 --- a/man/votequorum_qdisk_register.3 +++ b/man/votequorum_qdisk_register.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -41,7 +41,7 @@ votequorum_qdisk_register \- Registers a new quorum device .SH DESCRIPTION The .B votequorum_qdisk_register -is used to register a new quorum device. A quorum device is an external way of adding votes to a small +is used to register a new quorum device. A quorum device is an external way of adding votes to a small cluster. The quorum device is, in effect, a pseudo node in the cluster that provide votes based on some external device, usually a shared disk partition or perhaps a network router. .br diff --git a/man/votequorum_qdisk_unregister.3 b/man/votequorum_qdisk_unregister.3 index fde191ef..7d9dab0a 100644 --- a/man/votequorum_qdisk_unregister.3 +++ b/man/votequorum_qdisk_unregister.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/votequorum_setexpected.3 b/man/votequorum_setexpected.3 index c910921a..d33a6c98 100644 --- a/man/votequorum_setexpected.3 +++ b/man/votequorum_setexpected.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * diff --git a/man/votequorum_setvotes.3 b/man/votequorum_setvotes.3 index 9e3c1e0e..4fed319e 100644 --- a/man/votequorum_setvotes.3 +++ b/man/votequorum_setvotes.3 @@ -6,7 +6,7 @@ .\" * Author: Christine Caulfield .\" * .\" * This software licensed under BSD license, the text of which follows: -.\" * +.\" * .\" * Redistribution and use in source and binary forms, with or without .\" * modification, are permitted provided that the following conditions are met: .\" * @@ -41,7 +41,7 @@ votequorum_setvotes \- Sets the number of votes for a node .SH DESCRIPTION The .B votequorum_setvotes -is used to change the number of votes that a node has. Note that it is not possible, using this function, +is used to change the number of votes that a node has. Note that it is not possible, using this function, to change the number of node votes such that the cluster goes inquorate. .SH RETURN VALUE This call returns the CS_OK value if successful, otherwise an error is returned. diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am index 4fb64471..828eaa9e 100644 --- a/pkgconfig/Makefile.am +++ b/pkgconfig/Makefile.am @@ -1,12 +1,12 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # All rights reserved. -# +# # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/services/Makefile.am b/services/Makefile.am index 3c7d289d..2d85f70a 100644 --- a/services/Makefile.am +++ b/services/Makefile.am @@ -1,13 +1,13 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/test/Makefile.am b/test/Makefile.am index a9e3f29c..783c38a5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,14 +1,14 @@ # # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, diff --git a/test/logsys_s.c b/test/logsys_s.c index 0979af4d..76237182 100644 --- a/test/logsys_s.c +++ b/test/logsys_s.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/test/logsys_s1.c b/test/logsys_s1.c index 07bb1846..296b189e 100644 --- a/test/logsys_s1.c +++ b/test/logsys_s1.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/test/logsys_s2.c b/test/logsys_s2.c index e5d68bc4..a680ad96 100644 --- a/test/logsys_s2.c +++ b/test/logsys_s2.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/test/logsys_t1.c b/test/logsys_t1.c index fb5476f1..58240ffa 100644 --- a/test/logsys_t1.c +++ b/test/logsys_t1.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -40,7 +40,7 @@ #include LOGSYS_DECLARE_SYSTEM ("logsystestNOsubsystems", - LOGSYS_MODE_OUTPUT_STDERR | LOGSYS_MODE_OUTPUT_SYSLOG, + LOGSYS_MODE_OUTPUT_STDERR | LOGSYS_MODE_OUTPUT_SYSLOG, 0, NULL, LOGSYS_LEVEL_DEBUG, diff --git a/test/logsys_t2.c b/test/logsys_t2.c index 9960a4ed..c720a5be 100644 --- a/test/logsys_t2.c +++ b/test/logsys_t2.c @@ -6,7 +6,7 @@ * Author: Lon Hohberger (lhh@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/test/logsysrec.c b/test/logsysrec.c index 65ab9452..c621f406 100644 --- a/test/logsysrec.c +++ b/test/logsysrec.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/test/sa_error.c b/test/sa_error.c index c0dc6f2e..679601c7 100644 --- a/test/sa_error.c +++ b/test/sa_error.c @@ -39,8 +39,8 @@ const char *sa_error_list[] = { int get_sa_error(cs_error_t error, char *str, int len) { - if (error < CS_OK || - error > CS_ERR_NO_SECTIONS || + if (error < CS_OK || + error > CS_ERR_NO_SECTIONS || len < strlen(sa_error_list[error])) { errno = EINVAL; return -1; diff --git a/test/testevsth.c b/test/testevsth.c index 9a1635d9..9f8e5f65 100644 --- a/test/testevsth.c +++ b/test/testevsth.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * diff --git a/test/testmake.sh b/test/testmake.sh index 47f6c981..da7ade3b 100644 --- a/test/testmake.sh +++ b/test/testmake.sh @@ -71,7 +71,7 @@ test_4() rm -f $SRCDIR/make_o_path TEST="[4] make -f SRCDIR/Makefile from the builddir" - + rm -rf $BUILD_DIR mkdir -p $BUILD_DIR diff --git a/test/testparse.c b/test/testparse.c index 5ddefc64..ef7f3cca 100644 --- a/test/testparse.c +++ b/test/testparse.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -51,7 +51,7 @@ int main (void) printf ("Parse Error: %s\n", error); exit (-1); } - + saAmfPrintGroups (); #endif return (0); diff --git a/test/testtimer.c b/test/testtimer.c index 36416d8d..7cbbe7c4 100644 --- a/test/testtimer.c +++ b/test/testtimer.c @@ -6,7 +6,7 @@ * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -44,7 +44,7 @@ void timer_function (void *data) { printf ("timer %p\n", data); -} +} int main (void) { diff --git a/tools/Makefile.am b/tools/Makefile.am index d56468b4..3a1973b8 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,13 +1,13 @@ # Copyright (c) 2009 Red Hat, Inc. -# +# # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, @@ -37,7 +37,7 @@ sbin_PROGRAMS = corosync-fplay corosync-cfgtool \ corosync-pload corosync_pload_LDADD = ../lib/libpload.a -corosync_objctl_LDADD = ../lib/libconfdb.a ../lcr/liblcr.a +corosync_objctl_LDADD = ../lib/libconfdb.a ../lcr/liblcr.a corosync_cfgtool_LDADD = ../lib/libcfg.a lint: diff --git a/tools/corosync-pload.c b/tools/corosync-pload.c index d75ba091..c92801bd 100644 --- a/tools/corosync-pload.c +++ b/tools/corosync-pload.c @@ -1,12 +1,12 @@ /* - * Copyright (c) 2008 Red Hat, Inc. + * Copyright (c) 2008-2009 Red Hat, Inc. * * All rights reserved. * * Author: Steven Dake (sdake@redhat.com) * * This software licensed under BSD license, the text of which follows: - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: *