Skip to content

Commit

Permalink
[Server] Allow use of size suffixes in the ofs.xattr directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 authored and osschar committed Oct 10, 2019
1 parent 17a0cea commit 64cbb67
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/XrdOfs/XrdOfsConfig.cc
Expand Up @@ -1713,6 +1713,7 @@ int XrdOfs::xatr(XrdOucStream &Config, XrdSysError &Eroute)
{
char *val;
static const int xanRsv = 7;
long long vtmp;
int maxN = kXR_faMaxNlen, maxV = kXR_faMaxVlen;
bool isOn = true;

Expand All @@ -1722,16 +1723,18 @@ int XrdOfs::xatr(XrdOucStream &Config, XrdSysError &Eroute)
{Eroute.Emsg("Config","xattr maxnsz value not specified");
return 1;
}
if (XrdOuca2x::a2i(Eroute,"maxnsz",val,&maxN,
if (XrdOuca2x::a2sz(Eroute,"maxnsz",val,&vtmp,
xanRsv+1,kXR_faMaxNlen+xanRsv)) return 1;
maxN = static_cast<int>(vtmp);
}
else if (!strcmp("maxvsz", val))
{if (!(val = Config.GetWord()))
{Eroute.Emsg("Config","xattr maxvsz value not specified");
return 1;
}
if (XrdOuca2x::a2i(Eroute,"maxvsz",val,&maxV,0,kXR_faMaxVlen))
if (XrdOuca2x::a2sz(Eroute,"maxvsz",val,&vtmp,0,kXR_faMaxVlen))
return 1;
maxV = static_cast<int>(vtmp);
}
else if (!strcmp("uset", val))
{if (!(val = Config.GetWord()))
Expand Down

0 comments on commit 64cbb67

Please sign in to comment.