[Gluster-devel] how to reinstall a peer?

Emmanuel Dreyfus manu at netbsd.org
Tue Feb 26 17:01:27 UTC 2013

Emmanuel Dreyfus <manu at netbsd.org> wrote:

> glusterd1-xdr.c:
>          if (!xdr_string (xdrs, &objp->op_errstr, ~0))
>                  return FALSE;

How is this supposed to work? Here is below the NetBSD xdr_string()
implementation from libc. Even if objp->op_errstr is not NULL, the
maxsize argument set to 0 will cause it to always retrurn false. Does it
has another semantic in Linux?

xdr_string(xdrs, cpp, maxsize)
        XDR *xdrs;
        char **cpp;
        u_int maxsize;
        sp = *cpp;
        switch (xdrs->x_op) {
        case XDR_ENCODE:
                size = strlen(sp);
        if (size > maxsize) {
                return (FALSE);

Emmanuel Dreyfus
manu at netbsd.org

More information about the Gluster-devel mailing list