Review Board 1.7.16


logger: Replace 'struct ast_callid' with unsigned int's.

Review Request #4466 - Created March 11, 2015 and submitted

Corey Farrell
trunk
ASTERISK-24833
Reviewers
asterisk-dev
Asterisk
The logger currently uses an AO2 to store a callid (int).  This patch changes callid's to 'unsigned int'.  AO2 is not needed for callid's.

This also fixes a theoretical infinate loop if a callid is subjected to an extra unreference but left in threadstorage.  If ast_log tries getting an already released callid from threadstorage, ao2_ref will log an error.  This would cause ast_log to try grabbing a reference to the callid again (same thread).  The probability of this is very low and requires other code to be broken, but it's not impossible.

Change in behaviour: currently the first callid == 0.  This patch changes the first callid to 1 since 0 now represents the lack of callid.
Ran a couple tests against chan_sip and chan_iax2, visually inspected log files.
My dev system doesn't build chan_dahdi (ever), so Matt Jordan verified it still compiles.
Review request changed
Updated (March 12, 2015, 8:26 p.m.)
  • changed from pending to submitted
Committed in revision 432850

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.