From: Liu Yuan <[email protected]> For a fresh node joining, the latest epoch of itself is 0, so we simply return in this case or we'll meet an error message from epoch_log_read().
Signed-off-by: Liu Yuan <[email protected]> --- sheep/group.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sheep/group.c b/sheep/group.c index e300924..8fd2bf5 100644 --- a/sheep/group.c +++ b/sheep/group.c @@ -431,6 +431,9 @@ static struct sd_node *find_entry_epoch(struct sd_node *entry, struct sd_node nodes[SD_MAX_NODES]; int nr, i; + if (!epoch) + return NULL; + nr = epoch_log_read(epoch, nodes, sizeof(nodes)); for (i = 0; i < nr; i++) -- 1.7.10.2 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
