]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
CephContext: add method for retrieving admin socket
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 20 Jan 2012 23:58:37 +0000 (15:58 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Sat, 28 Jan 2012 01:07:45 +0000 (17:07 -0800)
This is needed to allow higher layers in the stack to add admin socket
commands.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/common/ceph_context.cc
src/common/ceph_context.h

index 285d9852bdcba453f74fa6e582a5c4f6b9df12bc..3519e1c76ac89a5666c20ad6cc4c64990287dc36 100644 (file)
@@ -231,4 +231,7 @@ PerfCountersCollection *CephContext::get_perfcounters_collection()
   return _perf_counters_collection;
 }
 
-
+AdminSocket *CephContext::get_admin_socket()
+{
+  return _admin_socket;
+}
index 8a8ad71925d72c7bad95a88aafd418696f65c0e5..f14a9f452faa187d03d7c62a9f1f5a0962a6fc61 100644 (file)
@@ -71,6 +71,16 @@ public:
     return _heartbeat_map;
   }
 
+  /**
+   * Get the admin socket associated with this CephContext.
+   *
+   * Currently there is always an admin socket object,
+   * so this will never return NULL.
+   *
+   * @return the admin socket
+   */
+  AdminSocket *get_admin_socket();
+
 private:
   CephContext(const CephContext &rhs);
   CephContext &operator=(const CephContext &rhs);
@@ -85,7 +95,7 @@ private:
   friend class CephContextServiceThread;
   CephContextServiceThread *_service_thread;
 
-  /* The collection of profiling loggers associated with this context */
+  /* The admin socket associated with this context */
   AdminSocket *_admin_socket;
 
   /* lock which protects service thread creation, destruction, etc. */