Thread-safe protection: libsmbclient initialization
authorDerrell Lipman <derrell@dworkin.(none)>
Wed, 13 May 2009 18:37:17 +0000 (14:37 -0400)
committerDerrell Lipman <derrell@dworkin.(none)>
Wed, 13 May 2009 18:37:28 +0000 (14:37 -0400)
commit636fbd1028bf22d9a93ae5029f6881e144f58fe1
tree55d8885ca838383fa8dcb19dabfd02618ceb6a62
parent045af600f299f55f5a5b09a23b753ba97880aa06
Thread-safe protection: libsmbclient initialization

- Begin converting init functions to use SMB_THREAD_ONCE. libsmbclient
  module-wide initialization is now moved into a separate function and called
  via SMB_THREAD_ONCE.

- libsmbclient counts users (contexts) so that it can release global resources
  when the last context is closed. That count of contexts is now protected by
  a mutex.

Derrell
source3/libsmb/libsmb_context.c