@@ -330,32 +330,20 @@ int SecurityDatabaseServer::authenticate(CheckStatusWrapper* status, IServerBloc
330330 bool found = false ;
331331 char pw1[MAX_LEGACY_PASSWORD_LENGTH + 1 ];
332332 PathName secureDbName;
333- { // reference & mutex scope scope
333+ { // instance scope
334334 // Get database block from cache
335- RefPtr< CachedSecurityDatabase> instance;
335+ CachedSecurityDatabase::Instance instance;
336336 instances->getInstance (iParameter, instance);
337337
338- try
339- {
340- MutexLockGuard g (instance->mutex , FB_FUNCTION);
341-
342- secureDbName = instance->secureDbName ;
343- if (!instance->secDb )
344- instance->secDb = FB_NEW SecurityDatabase (instance->secureDbName );
345-
346- user_name uname; // user name buffer
347- login.copyTo (uname, sizeof uname);
348- user_record user_block; // user record
349- found = instance->secDb ->lookup (uname, &user_block);
350- fb_utils::copy_terminate (pw1, user_block.password , MAX_LEGACY_PASSWORD_LENGTH + 1 );
351- }
352- catch (const Exception&)
353- {
354- instance->close ();
355- throw ;
356- }
338+ secureDbName = instance->secureDbName ;
339+ if (!instance->secDb )
340+ instance->secDb = FB_NEW SecurityDatabase (instance->secureDbName );
357341
358- instance->close ();
342+ user_name uname; // user name buffer
343+ login.copyTo (uname, sizeof uname);
344+ user_record user_block; // user record
345+ found = instance->secDb ->lookup (uname, &user_block);
346+ fb_utils::copy_terminate (pw1, user_block.password , MAX_LEGACY_PASSWORD_LENGTH + 1 );
359347 }
360348 if (!found)
361349 {
0 commit comments