summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2009-12-30 13:06:38 -0500
committerDwight <dmerriman@gmail.com>2009-12-30 13:06:38 -0500
commitb2105cd91f8ec229bd8962c5d1d5ffe17d1f5524 (patch)
tree48b6ecc4c4885a21fd028b7432da79065fbc1dc8
parent9f20ce7c030d50c40e912f150e71b708c70a9ac1 (diff)
parentc2004aeb45874cb2b98a89ae76b80b6173d63720 (diff)
downloadmongo-b2105cd91f8ec229bd8962c5d1d5ffe17d1f5524.tar.gz
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r--db/instance.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/db/instance.cpp b/db/instance.cpp
index 5a81f558b88..ff9a9b54c99 100644
--- a/db/instance.cpp
+++ b/db/instance.cpp
@@ -254,8 +254,14 @@ namespace mongo {
Client& c = cc();
c.clearns();
-
- CurOp& currentOp = *c.curop();
+
+ auto_ptr<CurOp> nestedOp;
+ CurOp* currentOpP = c.curop();
+ if ( currentOpP->active() ){
+ nestedOp.reset( new CurOp() );
+ currentOpP = nestedOp.get();
+ }
+ CurOp& currentOp = *currentOpP;
currentOp.reset(client);
currentOp.setOp(op);