Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0a588f475afdb7... Commit: 0a588f475afdb78660b424587f2c6460d4f1be82 Parent: 9eccf2611b6bfd92e4b15196b4744f24991a7bb8 Author: Ryan McCabe rmccabe@redhat.com AuthorDate: Wed Jul 25 10:52:33 2012 -0400 Committer: Ryan McCabe rmccabe@redhat.com CommitterDate: Wed Jul 25 10:52:33 2012 -0400
fence_xvm: Fix incorrect success return codes
This patch fixes two places where fence_xvm will return success for fencing operations when fencing has failed due to the challenge/response failing.
Resolves: rhbz#843083
Signed-off-by: Lon Hohberger lhh@redhat.com Signed-off-by: Ryan McCabe rmccabe@redhat.com --- fence/agents/xvm/fence_xvm.c | 4 ++-- 1 files 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");
cluster-commits@lists.stg.fedorahosted.org