Commits

Anonymous committed b7625bd Draft

move to ScopedDbConnection::getScopedDbConnection

  • Participants
  • Parent commits 609245e
  • Branches default

Comments (0)

Files changed (1)

File gridfs/mod_gridfs.cpp

 	apr_bucket_brigade *brigade = 0;
 	try
 	{
-		mongo::ScopedDbConnection connection(*config->connection_string, config->connect_timeout);
+               mongo::scoped_ptr<mongo::ScopedDbConnection> con( mongo::ScopedDbConnection::getScopedDbConnection(
+								    *config->connection_string, 
+                                                                    config->connect_timeout));
+               mongo::ScopedDbConnection& connection = *con;
+
+		ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, request, "mod_gridfs: pdw ok"); 
+
 		try
 		{
-			const mongo::GridFS gridfs(connection.conn(), *config->database);
+		  const mongo::GridFS gridfs(connection.conn(), *config->database);
 			const mongo::GridFile& gridfile = gridfs.findFile(filename, config->slave_ok);
 			if (!gridfile.exists())
 			{