]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip_distributor.c: Consistently pick a serializer for messages. 94/2994/1
authorRichard Mudgett <rmudgett@digium.com>
Thu, 26 May 2016 22:35:04 +0000 (17:35 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 8 Jun 2016 18:46:04 +0000 (13:46 -0500)
commit9a7a5aec184cc6cf88c298d36d23a022c68f9841
tree550c5e822fc97397c17621e7d71fbc8b5a333ffb
parentf2a76c4292a91681846b40fb5b3b9f2f9f5a39c9
pjsip_distributor.c: Consistently pick a serializer for messages.

Incoming messages that are not part of a dialog or a recognized response
to one of our requests need to be sent to a consistent serializer.  Under
load we may be queueing retransmissions before we can process the original
message.  We don't need to throw these messages onto random serializers
and cause reentrancy and message sequencing problems.

* Created a pool of pjsip/distributor serializers that get picked by
hashing the call-id and remote tag strings of the received messages.

* Made ast_sip_destroy_distributor() destroy items in the reverse order of
creation.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I2ce769389fc060d9f379977f559026fbcb632407
include/asterisk/res_pjsip.h
res/res_pjsip/pjsip_distributor.c