Skip to content

Commit

Permalink
SERVER-7271 - Fix compile error with ScopedDbConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
monkey101 committed Apr 2, 2013
1 parent 822840b commit 8121217
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mongo/client/distlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,9 @@ namespace mongo {


bool DistributedLock::isLockHeld( double timeout, string* errMsg ) {
ScopedDbConnection conn(_conn.toString(), timeout );
scoped_ptr<ScopedDbConnection> connPtr(
ScopedDbConnection::getInternalScopedDbConnection( _conn.toString(), timeout ) );
ScopedDbConnection& conn = *connPtr;

BSONObj lockObj;
try {
Expand Down Expand Up @@ -564,7 +566,9 @@ namespace mongo {
if ( other == NULL )
other = &dummyOther;

ScopedDbConnection conn(_conn.toString(), timeout );
scoped_ptr<ScopedDbConnection> connPtr(
ScopedDbConnection::getInternalScopedDbConnection( _conn.toString(), timeout ) );
ScopedDbConnection& conn = *connPtr;

BSONObjBuilder queryBuilder;
queryBuilder.append( LocksType::name() , _name );
Expand Down

0 comments on commit 8121217

Please sign in to comment.