mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-01 20:39:38 -05:00
- Fixup compile on cygwin, more portable openssl thread id.
git-svn-id: file:///svn/unbound/trunk@3362 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
3568ea8bb5
commit
29f18d8f86
4 changed files with 21 additions and 1 deletions
|
|
@ -1,3 +1,6 @@
|
|||
16 March 2015: Wouter
|
||||
- Fixup compile on cygwin, more portable openssl thread id.
|
||||
|
||||
12 March 2015: Wouter
|
||||
- Updated default keylength in unbound-control-setup to 3k.
|
||||
|
||||
|
|
|
|||
|
|
@ -164,6 +164,14 @@ void log_thread_set(int* num)
|
|||
ub_thread_key_set(logkey, num);
|
||||
}
|
||||
|
||||
int log_thread_get(void)
|
||||
{
|
||||
unsigned int* tid;
|
||||
if(!key_created) return 0;
|
||||
tid = (unsigned int*)ub_thread_key_get(logkey);
|
||||
return (int)(tid?*tid:0);
|
||||
}
|
||||
|
||||
void log_ident_set(const char* id)
|
||||
{
|
||||
ident = id;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,15 @@ void log_file(FILE *f);
|
|||
*/
|
||||
void log_thread_set(int* num);
|
||||
|
||||
/**
|
||||
* Get the thread id from logging system. Set after log_init is
|
||||
* initialised, or log_thread_set for newly created threads.
|
||||
* This initialisation happens in unbound as a daemon, in daemon
|
||||
* startup code, when that spawns threads.
|
||||
* @return thread number, from 0 and up. Before initialised, returns 0.
|
||||
*/
|
||||
int log_thread_get(void);
|
||||
|
||||
/**
|
||||
* Set identity to print, default is 'unbound'.
|
||||
* @param id: string to print. Name of executable.
|
||||
|
|
|
|||
|
|
@ -770,7 +770,7 @@ static lock_basic_t *ub_openssl_locks = NULL;
|
|||
static unsigned long
|
||||
ub_crypto_id_cb(void)
|
||||
{
|
||||
return (unsigned long)ub_thread_self();
|
||||
return log_thread_get();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue