summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/current_op.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-05-15 14:39:52 -0400
committerAndy Schwerin <schwerin@mongodb.com>2015-05-18 13:39:23 -0400
commitd5bf63455aa614d98ac840f09ce5ca6b813b9507 (patch)
treeba5161195343c4b9b5d5dadea9ea3b6d7e86fd1f /src/mongo/db/commands/current_op.cpp
parentbb3c301d62a8c5601fb0bed176013ef7ac0a3720 (diff)
downloadmongo-d5bf63455aa614d98ac840f09ce5ca6b813b9507.tar.gz
SERVER-18515 Replace OperationContext::getCurOp with CurOp::get(OperationContext*)
Diffstat (limited to 'src/mongo/db/commands/current_op.cpp')
-rw-r--r--src/mongo/db/commands/current_op.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp
index 0bb4576c954..7d3957ea42f 100644
--- a/src/mongo/db/commands/current_op.cpp
+++ b/src/mongo/db/commands/current_op.cpp
@@ -111,9 +111,11 @@ namespace mongo {
if (!includeAll) {
// Skip over inactive connections.
- if (!opCtx || !opCtx->getCurOp() || !opCtx->getCurOp()->active()) {
+ if (!opCtx)
+ continue;
+ auto curOp = CurOp::get(opCtx);
+ if (!curOp || !curOp->active())
continue;
- }
}
BSONObjBuilder infoBuilder;
@@ -124,8 +126,8 @@ namespace mongo {
// Operation context specific information
if (opCtx) {
// CurOp
- if (opCtx->getCurOp()) {
- opCtx->getCurOp()->reportState(&infoBuilder);
+ if (CurOp::get(opCtx)) {
+ CurOp::get(opCtx)->reportState(&infoBuilder);
}
// LockState