mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Fixed my 6-years old but unnoticed bug with circular strings buffer
(cherry picked from commit79da7e449e
) (cherry picked from commitb5d72efdd5
)
This commit is contained in:
parent
ceabdd62f6
commit
d2b4b6d4c9
@ -2934,7 +2934,7 @@ void makeKey()
|
|||||||
int err = pthread_key_create(&key, ThreadCleanup::destructor);
|
int err = pthread_key_create(&key, ThreadCleanup::destructor);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
Firebird::system_call_failed("pthread_key_create", err);
|
Firebird::system_call_failed::raise("pthread_key_create", err);
|
||||||
}
|
}
|
||||||
keySet = true;
|
keySet = true;
|
||||||
}
|
}
|
||||||
@ -2944,13 +2944,13 @@ void ThreadCleanup::initThreadCleanup()
|
|||||||
int err = pthread_once(&keyOnce, makeKey);
|
int err = pthread_once(&keyOnce, makeKey);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
Firebird::system_call_failed("pthread_once", err);
|
Firebird::system_call_failed::raise("pthread_once", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = pthread_setspecific(key, &key);
|
err = pthread_setspecific(key, &key);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
Firebird::system_call_failed("pthread_setspecific", err);
|
Firebird::system_call_failed::raise("pthread_setspecific", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2974,7 +2974,7 @@ public:
|
|||||||
{
|
{
|
||||||
int err = pthread_key_delete(key);
|
int err = pthread_key_delete(key);
|
||||||
if (err)
|
if (err)
|
||||||
Firebird::system_call_failed("pthread_key_delete", err);
|
gds__log("pthread_key_delete failed with error %d", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user