From b85be10e636356fa55493e29ee541e0a46c78814 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Wed, 21 May 2008 08:40:58 +0000 Subject: [PATCH] Fixed static variables in verify_database_name() - thanks to Claudio --- src/jrd/jrd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp index 004478574d..585d784e40 100644 --- a/src/jrd/jrd.cpp +++ b/src/jrd/jrd.cpp @@ -5677,14 +5677,14 @@ static vdnResult verify_database_name(const Firebird::PathName& name, ISC_STATUS { // Check for security2.fdb static TEXT SecurityNameBuffer[MAXPATHLEN] = ""; - static Firebird::PathName ExpandedSecurityNameBuffer(*getDefaultMemoryPool()); - static Firebird::Mutex mutex; + static Firebird::GlobalPtr ExpandedSecurityNameBuffer; + static Firebird::GlobalPtr mutex; Firebird::MutexLockGuard guard(mutex); if (! SecurityNameBuffer[0]) { SecurityDatabase::getPath(SecurityNameBuffer); - ExpandedSecurityNameBuffer = SecurityNameBuffer; + ExpandedSecurityNameBuffer->assign(SecurityNameBuffer); ISC_expand_filename(ExpandedSecurityNameBuffer, false); } if (name == SecurityNameBuffer || name == ExpandedSecurityNameBuffer)