]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled. 51/1451/1
authorRichard Mudgett <rmudgett@digium.com>
Fri, 2 Oct 2015 22:05:16 +0000 (17:05 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 20 Oct 2015 16:12:02 +0000 (11:12 -0500)
commit78ab76b46ca50cdc544cd820cc187b4a2f6e5312
tree71cb17ae283965dc8e9a4d9a667425feb7ac480f
parent47a945278019cf4a6a38e0431ca6f4b8e7b6f5e3
Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled.

When DEBUG_THREADLOCALS is enabled it causes the threadlocal cleanup to be
called as a function.  This causes a compile error with raw threadstorage as
it uses NULL for cleanup.  This fix uses a macro that provides NULL when
DEBUG_THREADLOCALS is disabled, and replaces the call to "c_cleanup(data);"
with "{};" when DEBUG_THREADLOCALS is enabled.

ASTERISK-24975 #close
Reported by: Ashley Sanders

**** ASTERISK-24975 Change-Id: I3ef7428ee402816d9fcefa1b3b95830c00d5c402

Cherry-pick from v13 with additional definitions of
AST_THREADSTORAGE_RAW(), ast_threadstorage_get_ptr() and
ast_threadstorage_set_ptr() from
commit d01706ce1ee518118456d5673f529204bdac73bb.

Change-Id: I3222102d005f76744561b95a3b97700d82a5ee58
include/asterisk/threadstorage.h