From 58dd3db0be62f67aa51f78357ceabb0979ccf6e1 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 20 Sep 2016 16:34:37 +0100 Subject: [PATCH] mgr: update for Dispatcher::ms_handle_refused Signed-off-by: John Spray --- src/mgr/DaemonServer.cc | 5 +++++ src/mgr/DaemonServer.h | 1 + src/mgr/MgrClient.cc | 5 +++++ src/mgr/MgrClient.h | 1 + src/mgr/MgrStandby.cc | 6 ++++++ src/mgr/MgrStandby.h | 2 ++ 6 files changed, 20 insertions(+) diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 8ba6f904665..f0be92a1a9d 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -117,6 +117,11 @@ bool DaemonServer::ms_get_authorizer(int dest_type, return *authorizer != NULL; } +bool DaemonServer::ms_handle_refused(Connection *con) +{ + // do nothing for now + return false; +} bool DaemonServer::ms_dispatch(Message *m) { diff --git a/src/mgr/DaemonServer.h b/src/mgr/DaemonServer.h index 2540e38b1ec..52afefbcfa4 100644 --- a/src/mgr/DaemonServer.h +++ b/src/mgr/DaemonServer.h @@ -66,6 +66,7 @@ public: bool ms_dispatch(Message *m); bool ms_handle_reset(Connection *con) { return false; } void ms_handle_remote_reset(Connection *con) {} + bool ms_handle_refused(Connection *con); bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new); bool ms_verify_authorizer(Connection *con, diff --git a/src/mgr/MgrClient.cc b/src/mgr/MgrClient.cc index bc272d34381..b6ece6c37ed 100644 --- a/src/mgr/MgrClient.cc +++ b/src/mgr/MgrClient.cc @@ -170,6 +170,11 @@ bool MgrClient::ms_handle_reset(Connection *con) #endif } +bool MgrClient::ms_handle_refused(Connection *con) +{ + // do nothing for now + return false; +} void MgrClient::send_report() { diff --git a/src/mgr/MgrClient.h b/src/mgr/MgrClient.h index 396bb7473b0..80cedf0f412 100644 --- a/src/mgr/MgrClient.h +++ b/src/mgr/MgrClient.h @@ -84,6 +84,7 @@ public: bool ms_dispatch(Message *m); bool ms_handle_reset(Connection *con); void ms_handle_remote_reset(Connection *con) {} + bool ms_handle_refused(Connection *con); bool handle_mgr_map(MMgrMap *m); bool handle_mgr_configure(MMgrConfigure *m); diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index 7264caab5ea..f8340e3296e 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -208,6 +208,12 @@ bool MgrStandby::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, return *authorizer != NULL; } +bool MgrStandby::ms_handle_refused(Connection *con) +{ + // do nothing for now + return false; +} + // A reference for use by the signal handler MgrStandby *signal_mgr = nullptr; diff --git a/src/mgr/MgrStandby.h b/src/mgr/MgrStandby.h index 4c46a0730ee..0762764cdc5 100644 --- a/src/mgr/MgrStandby.h +++ b/src/mgr/MgrStandby.h @@ -52,6 +52,8 @@ public: void ms_handle_remote_reset(Connection *con) {} bool ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool force_new); + bool ms_handle_refused(Connection *con); + int init(); void shutdown(); void usage() {} -- 2.47.3