From 0820e7c12c08625c45ade8f79db4c8a0e67d5f59 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 4 Dec 2008 14:08:39 -0800 Subject: [PATCH] cleanup, whitespace --- src/common/LogClient.cc | 2 +- src/mds/MDS.h | 2 +- src/msg/Dispatcher.cc | 11 ----------- src/msg/Dispatcher.h | 4 ++-- src/osd/OSD.cc | 2 +- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/common/LogClient.cc b/src/common/LogClient.cc index 8279dc41911..e88eab4e06e 100644 --- a/src/common/LogClient.cc +++ b/src/common/LogClient.cc @@ -82,7 +82,7 @@ void LogClient::handle_log(MLog *m) delete m; } -bool LogClient::dispatch_impl(Message *m) +bool LogClient::dispatch_impl(Message *m) { dout(20) << "dispatch " << m << dendl; diff --git a/src/mds/MDS.h b/src/mds/MDS.h index d89e2954526..030ec239617 100644 --- a/src/mds/MDS.h +++ b/src/mds/MDS.h @@ -217,7 +217,7 @@ class MDS : public Dispatcher { int get_req_rate() { return req_rate; } - private: + private: virtual bool dispatch_impl(Message *m); public: MDS(int whoami, Messenger *m, MonMap *mm); diff --git a/src/msg/Dispatcher.cc b/src/msg/Dispatcher.cc index 80dadb03f95..4fa04d7d4c9 100644 --- a/src/msg/Dispatcher.cc +++ b/src/msg/Dispatcher.cc @@ -26,14 +26,3 @@ int Dispatcher::send_message(Message *m, msg_addr_t dest, int dest_port) //return dis_messenger->send_message(m, dest, dest_port, MDS_PORT_SERVER); // on my port! } */ -void Dispatcher::dispatch(Message *m) { - if (!dispatch_impl(m)) { - if (next) { - next->dispatch(m); - } else { - dout(10) << "dispatch doesn't recognize message type " << m->get_type() << dendl; - assert(0); - } - } -} - diff --git a/src/msg/Dispatcher.h b/src/msg/Dispatcher.h index c8274f30a9c..634f964d04f 100644 --- a/src/msg/Dispatcher.h +++ b/src/msg/Dispatcher.h @@ -29,7 +29,7 @@ class Dispatcher { virtual ~Dispatcher() { } Dispatcher() : next(NULL) { } - virtual void dispatch(Message *m) { + virtual void dispatch(Message *m) { bool ret = false; if (next) ret = next->dispatch_impl(m); @@ -43,7 +43,7 @@ class Dispatcher { virtual void link_dispatcher(Dispatcher *disp) { if (!next) { - next = disp; + next = disp; } else { next->link_dispatcher(disp); } diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c77b8fa72d1..094f02a6dc7 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1452,7 +1452,7 @@ bool OSD::heartbeat_dispatch(Message *m) return true; } -bool OSD::dispatch_impl(Message *m) +bool OSD::dispatch_impl(Message *m) { // lock! osd_lock.Lock();