[Ocfs2-tools-devel] [PATCH 4/5] libo2cb: Extend libo2cb api to learn ip address/port/local of a registered node

Joel Becker Joel.Becker at oracle.com
Thu Dec 16 19:12:42 PST 2010


On Thu, Dec 16, 2010 at 01:35:16PM -0800, Sunil Mushran wrote:
> +static char *do_strchomp(char *str)

	Didn't you just add tools_strchomp()?  I presume this is what
you were referring to in the series description ;-)

Joel
> +errcode_t o2cb_get_node_port(const char *cluster_name, const char *node_name,
> +			     uint32_t *ip_port)
> +{
> +	char val[30];
> +	char *p;
> +	errcode_t ret;
> +
> +	ret = o2cb_get_node_attribute(cluster_name, node_name, "ipv4_port",
> +				      val, sizeof(val));
> +	if (ret)
> +		return ret;
> +
> +	*ip_port = strtoul(val, &p, 0);
> +	if (!p || (*p && *p != '\n'))
> +		return O2CB_ET_INTERNAL_FAILURE;

	These are not internal failures, they are a problem with the
values in configfs.  Probably more SERVICE_UNAVAILABLE.

Joel

-- 

"All alone at the end of the evening
 When the bright lights have faded to blue.
 I was thinking about a woman who had loved me
 And I never knew"

Joel Becker
Senior Development Manager
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list