summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/health.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/health.cpp')
-rw-r--r--src/mongo/db/repl/health.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/repl/health.cpp b/src/mongo/db/repl/health.cpp
index 55fd017ca98..1fa974d6889 100644
--- a/src/mongo/db/repl/health.cpp
+++ b/src/mongo/db/repl/health.cpp
@@ -349,6 +349,15 @@ namespace mongo {
return 0;
}
+ Member* ReplSetImpl::getMutableMember(unsigned id) {
+ if( _self && id == _self->id() ) return _self;
+
+ for( Member *m = head(); m; m = m->next() )
+ if( m->id() == id )
+ return m;
+ return 0;
+ }
+
Member* ReplSetImpl::findByName(const std::string& hostname) const {
if (_self && hostname == _self->fullName()) {
return _self;