]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/AuthMonitor: fix wrongly error handling logic
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 6 Jun 2016 11:24:01 +0000 (19:24 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 7 Jun 2016 02:19:01 +0000 (10:19 +0800)
We shall set err correctly instead of rs here...

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/AuthMonitor.cc

index 9bfc81434f8041e0d9c7094251a39ca04fe722b6..0358fa06c778dc198b6f99a9efbe1c5fff668b91 100644 (file)
@@ -721,7 +721,7 @@ bool AuthMonitor::prepare_command(MonOpRequestRef op)
       ::decode(keyring, iter);
     } catch (const buffer::error &ex) {
       ss << "error decoding keyring" << " " << ex.what();
-      rs = err;
+      err = -EINVAL;
       goto done;
     }
     import_keyring(keyring);