diff options
author | Noah Watkins <noahwatkins@gmail.com> | 2013-03-03 10:32:04 -0800 |
---|---|---|
committer | Noah Watkins <noahwatkins@gmail.com> | 2013-08-25 08:58:27 -0700 |
commit | f2d6b9585c43ece95faf258c1d619ee8561338c2 (patch) | |
tree | 1057e439a41eec169d73e015c28031470762cbb4 /src/cls/lua/cls_lua_client.cc | |
parent | 0d46cfd0cf10271d01133edf2da6c4b43348ebff (diff) | |
download | ceph-cls-lua.tar.gz |
lua: don't decode reply on errorcls-lua
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Diffstat (limited to 'src/cls/lua/cls_lua_client.cc')
-rw-r--r-- | src/cls/lua/cls_lua_client.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cls/lua/cls_lua_client.cc b/src/cls/lua/cls_lua_client.cc index fef12b2b084..f949d4ccf28 100644 --- a/src/cls/lua/cls_lua_client.cc +++ b/src/cls/lua/cls_lua_client.cc @@ -29,7 +29,15 @@ namespace cls_lua_client { cmd.input = input; ::encode(cmd, inbl); + /* + * TODO: we need to encapsulate the return value as well. for example, + * -ENOTSUPP is returned if the class is not found, but we also return + * -ENOTSUPP if a handler isn't found. In the later case we still get a + * valid reply, in the former not so much. + */ ret = ioctx.exec(oid, "lua", "eval", inbl, outbl); + if (ret < 0) + return ret; try { ::decode(reply, outbl); |