[sheepdog] [PATCH v2] sheep: check unknown join result in sd_join_handler()
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Tue Feb 19 02:34:34 CET 2013
sd_join_handler() does nothing even if a join result is unknown
value. The unknown value means sd_check_join_cb() is buggy, so
after receiving such a value sheep should print error message and die.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/group.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index 85e0032..fab9918 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -1085,6 +1085,10 @@ void sd_join_handler(const struct sd_node *joined,
/* this output is used for testing */
sd_printf(SDOG_DEBUG, "join Sheepdog cluster\n");
break;
+ default:
+ /* this means sd_check_join_cb() is buggy */
+ panic("unknown cluster join result: %d\n", result);
+ break;
}
}
--
1.7.2.5
More information about the sheepdog
mailing list