[sheepdog] [PATCH v7 6/7] zookeeper: handle session timeout for all zookeeper operations

MORITA Kazutaka morita.kazutaka at gmail.com
Wed Jun 26 00:44:52 CEST 2013


> @@ -476,8 +519,11 @@ static int add_event(enum zk_event_type type, struct zk_node *znode, void *buf,
>  	ev.buf_len = buf_len;
>  	if (buf)
>  		memcpy(ev.buf, buf, buf_len);
> -	zk_queue_push(&ev);
> -	return 0;
> +	rc = zk_queue_push(&ev);
> +	if (rc != ZOK)
> +		sd_eprintf("failed, type: %d", type);
> +
> +	return rc;
>  }

add_event is expected to return 0 on success and -1 on error.

Thanks,

Kazutaka



More information about the sheepdog mailing list