bareos: bareos-12.4 a55b07b6

Author Committer Branch Timestamp Parent
mvwieringen adm mvwieringen adm bareos-12.4 2013-08-02 15:45 bareos-12.4 8060d4ff Pending
Affected Issues  0000210: Filed doesn't respond to first connection after start.
Changeset Filed doesn't respond to first connection after start.

The setup of the thread specific key is flawed. In essence
its setup twice (once via the init_msg() call and once
via the pthread_once call in jcr.c). This new code fixes
that by:

- Setup thread specific data key only once.
- Use pthread_key_create_once_np when available.
  This is a non portable but cleaner implementation of
  both a pthread_once() and a pthread_key_create().
- For Windows use a workaround around pthread_once() as that
  seems to hang for unknown reason. Now we use a boolean
  protected by an mutex to make sure the setup is only done once.

Fixes 0000210: Filed doesn't respond to first connection after start.
mod - src/lib/jcr.c Diff File
mod - src/lib/message.c Diff File