[sheepdog] [PATCH 1/2] fix sheep crash when executing functional test 009
Hitoshi Mitake
mitake.hitoshi at gmail.com
Mon Aug 11 15:43:20 CEST 2014
At Mon, 11 Aug 2014 18:11:43 +0800,
Ruoyu wrote:
>
> No participant should be permitted. In the situation, just return
> is OKay in function del_participant.
>
> Signed-off-by: Ruoyu <liangry at ucweb.com>
> ---
> sheep/vdi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied this one. Thanks a lot for fixing and sorry for the bug!
Thanks,
Hitoshi
>
> diff --git a/sheep/vdi.c b/sheep/vdi.c
> index 9db38c4..05cae7b 100644
> --- a/sheep/vdi.c
> +++ b/sheep/vdi.c
> @@ -390,7 +390,8 @@ static void del_participant(struct vdi_state_entry *entry,
> {
> int idx = -1;
>
> - assert(0 < entry->nr_participants);
> + if (entry->nr_participants == 0)
> + return;
>
> for (int i = 0; i < entry->nr_participants; i++) {
> if (!node_id_cmp(&entry->participants[i], owner)) {
> --
> 1.8.3.2
>
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list