diff options
author | Shaun Verch <shaun.verch@10gen.com> | 2013-10-16 15:33:25 -0400 |
---|---|---|
committer | Shaun Verch <shaun.verch@10gen.com> | 2013-10-16 15:39:21 -0400 |
commit | 7d1febe107917b8378023ab9af26f5e4f0d1a30c (patch) | |
tree | 485161aad5ffdce77bd2dd0a4d5cc300de8c2cd8 | |
parent | 5747ceaf63f5c6b713cd1874a4a01b048b5442b6 (diff) | |
download | mongo-7d1febe107917b8378023ab9af26f5e4f0d1a30c.tar.gz |
SERVER-11212 Make sure snmp module is correctly initialized
-rw-r--r-- | src/mongo/db/db.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/db.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 63b9605e4f9..78c5d5f2819 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -95,6 +95,8 @@ namespace mongo { + void (*snmpInit)() = NULL; + /* only off if --nohints */ extern bool useHints; @@ -684,6 +686,12 @@ namespace mongo { FileAllocator::get()->start(); + // TODO: This should go into a MONGO_INITIALIZER once we have figured out the correct + // dependencies. + if (snmpInit) { + snmpInit(); + } + MONGO_ASSERT_ON_EXCEPTION_WITH_MSG( clearTmpFiles(), "clear tmp files" ); dur::startup(); diff --git a/src/mongo/db/db.h b/src/mongo/db/db.h index 1ac951a9364..248a4e121ed 100644 --- a/src/mongo/db/db.h +++ b/src/mongo/db/db.h @@ -116,4 +116,6 @@ namespace mongo { bool unlocked() const { return real != 0; } }; + extern void (*snmpInit)(); + } // namespace mongo |