cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Ryan McCabe <rmccabe@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] fence_xvm: Fix incorrect success return codes
Date: Wed, 25 Jul 2012 10:43:42 -0400	[thread overview]
Message-ID: <20120725144331.GA71022@redhat.com> (raw)

This patch fixes two places where fence_xvm will return success
for fencing operations when fencing has failed due to the
challenge/response failing.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
 fence/agents/xvm/fence_xvm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fence/agents/xvm/fence_xvm.c b/fence/agents/xvm/fence_xvm.c
index d1ffb12..eb006fd 100644
--- a/fence/agents/xvm/fence_xvm.c
+++ b/fence/agents/xvm/fence_xvm.c
@@ -99,14 +99,14 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key,
 	if (tcp_challenge(fd, auth, key, key_len, timeout) <= 0) {
 		/* Challenge failed */
 		printf("Invalid response to challenge\n");
-		return 0;
+		return 1;
 	}
 
 	/* Now they'll send us one, so we need to respond here */
 	dbg_printf(3, "Responding to TCP challenge\n");
 	if (tcp_response(fd, auth, key, key_len, timeout) <= 0) {
 		printf("Invalid response to challenge\n");
-		return 0;
+		return 1;
 	}
 
 	dbg_printf(2, "TCP Exchange + Authentication done... \n");
-- 
1.7.10.4



             reply	other threads:[~2012-07-25 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 14:43 Ryan McCabe [this message]
2012-07-25 14:50 ` [Cluster-devel] [PATCH] fence_xvm: Fix incorrect success return codes Lon Hohberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120725144331.GA71022@redhat.com \
    --to=rmccabe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).