Added counter for unhandled_bmsg Print, this prevents the logs to be flooded to fast and save CPU in this error scenario. Added 'last_used' element to bc structure, when a bchannel changes from used to free this exact time will be marked in last_used. When a new channel is requested the find_free_chan function will check if the new empty channel was used within the last second, if yes it will search for the next channel, if no it will return this channel. This simple mechanism has prooven to prevent race conditions where the NT and TE tried to allocate the exact same channel at the same time (RELEASE cause: 44).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Christian Richter
2008-06-02 08:35:28 +00:00
parent 69213c8eb6
commit a3fe7673a9
2 changed files with 44 additions and 4 deletions

View File

@@ -230,6 +230,7 @@ struct misdn_bchannel {
int channel_preselected;
int in_use;
struct timeval last_used;
int cw;
int addr;