On (03/06/13 12:50), Lukas Slebodnik wrote:
ehlo
I solved ticket #1929 and then I immediately hit another one #1947 (BZ967004)
It seems that reporter from second ticket was lucky and did not hit the first
issue.
Use meta server if there isn't another server after meta.
The same behaviour is in "done" section, if return code is not OK
https://fedorahosted.org/sssd/ticket/1947
Patch is attached.
LS
From f885ea412076843b3e6bf97be51a2e7ae8a0240a Mon Sep 17 00:00:00
2001
From: Lukas Slebodnik <lslebodn(a)redhat.com>
Date: Fri, 31 May 2013 14:18:17 +0200
Subject: [PATCH] Use meta server if there isn't another server after meta.
The same behaviour is in "done" section, if return code is not OK
https://fedorahosted.org/sssd/ticket/1947
---
src/providers/fail_over.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index 12b6c37828b7da0e68579bbb94668c21574974f1..6fa8b19c6e14d778d5f438b1578f3a22876b1625
100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -1285,7 +1285,7 @@ resolve_srv_done(struct tevent_req *subreq)
}
}
- state->out = state->meta->next;
+ state->out = (state->meta->next) ? state->meta->next :
state->meta;
^^^^^^^^
This code is little bit different in sssd-1-9 branch
Somethink like this
if (srv_list) {
<snip>
state->out = srv_list
tevent_req_done(req);
return;
} else {
ret = EIO;
goto fail;
}
Should We return EIO? Or my solution is good enough.
LS