]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: init HeartbeatDispatcher using OSD->cct
authorKefu Chai <kchai@redhat.com>
Sat, 6 Feb 2016 15:35:14 +0000 (23:35 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 6 Feb 2016 17:59:44 +0000 (01:59 +0800)
its base class 'Dispatcher' is uninitialized when used here to access
'Dispatcher::cct', so we'd better use OSD::cct to initialize it instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/OSD.h

index 169623a73d65bdafe4322543b7a4c3069d474127..e53fc6b640ca40339c08040a7a1e41bb7392757e 100644 (file)
@@ -1565,7 +1565,7 @@ public:
 
   struct HeartbeatDispatcher : public Dispatcher {
     OSD *osd;
-    explicit HeartbeatDispatcher(OSD *o) : Dispatcher(cct), osd(o) {}
+    explicit HeartbeatDispatcher(OSD *o) : Dispatcher(o->cct), osd(o) {}
     bool ms_dispatch(Message *m) {
       return osd->heartbeat_dispatch(m);
     }