]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/ActivePyModules.cc
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / mgr / ActivePyModules.cc
index ec7d941c8f5486ce3c577a17902a157f9c080157..71c767915b2ffa898eca34251c298e97458d3c41 100644 (file)
@@ -925,22 +925,24 @@ void ActivePyModules::set_health_checks(const std::string& module_name,
 }
 
 int ActivePyModules::handle_command(
-  std::string const &module_name,
+  const ModuleCommand& module_command,
+  const MgrSession& session,
   const cmdmap_t &cmdmap,
   const bufferlist &inbuf,
   std::stringstream *ds,
   std::stringstream *ss)
 {
-  lock.Lock();
-  auto mod_iter = modules.find(module_name);
+  lock.lock();
+  auto mod_iter = modules.find(module_command.module_name);
   if (mod_iter == modules.end()) {
-    *ss << "Module '" << module_name << "' is not available";
-    lock.Unlock();
+    *ss << "Module '" << module_command.module_name << "' is not available";
+    lock.unlock();
     return -ENOENT;
   }
 
-  lock.Unlock();
-  return mod_iter->second->handle_command(cmdmap, inbuf, ds, ss);
+  lock.unlock();
+  return mod_iter->second->handle_command(module_command, session, cmdmap,
+                                          inbuf, ds, ss);
 }
 
 void ActivePyModules::get_health_checks(health_check_map_t *checks)