public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - cmanquorum: return CS_ERR codes
@ 2009-01-20 11:34 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-01-20 11:34 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0f256a3461c7d8d9c30821cb867727aff829ba34
Commit:        0f256a3461c7d8d9c30821cb867727aff829ba34
Parent:        cb8f019ea31adcce8f9c552f3d2df0ca59ae5b68
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Tue Jan 20 11:33:11 2009 +0000
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Tue Jan 20 11:33:11 2009 +0000

cmanquorum: return CS_ERR codes

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 cman/services/quorum/services/cmanquorum.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cman/services/quorum/services/cmanquorum.c b/cman/services/quorum/services/cmanquorum.c
index 100c535..630af5a 100644
--- a/cman/services/quorum/services/cmanquorum.c
+++ b/cman/services/quorum/services/cmanquorum.c
@@ -1178,7 +1178,7 @@ static void message_handler_req_lib_cmanquorum_setexpected (void *conn, void *me
 	 * to bypass them by fiddling with expected votes.
 	 */
 	if (quorum_flags & CMANQUORUM_FLAG_FEATURE_DISALLOWED && have_disallowed()) {
-		error = -EINVAL;
+		error = CS_ERR_EXIST;
 		goto error_exit;
 	}
 
@@ -1186,7 +1186,7 @@ static void message_handler_req_lib_cmanquorum_setexpected (void *conn, void *me
 	newquorum = calculate_quorum(1, req_lib_cmanquorum_setexpected->expected_votes, &total_votes);
 	if (newquorum < total_votes / 2
 	    || newquorum > total_votes) {
-		error = -EINVAL;
+		error = CS_ERR_INVALID_PARAM;
 		goto error_exit;
 	}
 
@@ -1216,7 +1216,7 @@ static void message_handler_req_lib_cmanquorum_setvotes (void *conn, void *messa
 
 	node = find_node_by_nodeid(req_lib_cmanquorum_setvotes->nodeid);
 	if (!node) {
-		error = -EINVAL;
+		error = CS_ERR_NAME_NOT_FOUND;
 		goto error_exit;
 	}
 
@@ -1228,7 +1228,7 @@ static void message_handler_req_lib_cmanquorum_setvotes (void *conn, void *messa
 
 	if (newquorum < total_votes / 2 || newquorum > total_votes) {
 		node->votes = saved_votes;
-		error = -EINVAL;
+		error = CS_ERR_INVALID_PARAM;
 		goto error_exit;
 	}
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-20 11:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-20 11:34 cluster: master - cmanquorum: return CS_ERR codes Christine Caulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).