the param will be thrown away anyway. see
CephxClientHandler::handle_response().
Signed-off-by: Kefu Chai <kchai@redhat.com>
return secrets.need_new_secrets(now);
}
-void RotatingKeyRing::set_secrets(RotatingSecrets& s)
+void RotatingKeyRing::set_secrets(RotatingSecrets&& s)
{
Mutex::Locker l(lock);
- secrets = s;
+ secrets = std::move(s);
dump_rotating();
}
bool need_new_secrets() const;
bool need_new_secrets(utime_t now) const;
- void set_secrets(RotatingSecrets& s);
+ void set_secrets(RotatingSecrets&& s);
void dump_rotating() const;
bool get_secret(const EntityName& name, CryptoKey& secret) const override;
bool get_service_secret(uint32_t service_id, uint64_t secret_id,
<< error << dendl;
return -EINVAL;
} else {
- rotating_secrets->set_secrets(secrets);
+ rotating_secrets->set_secrets(std::move(secrets));
}
}
}