]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip_distributor.c: Consistently pick a serializer for messages. 48/2948/2
authorRichard Mudgett <rmudgett@digium.com>
Thu, 26 May 2016 22:35:04 +0000 (17:35 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 7 Jun 2016 18:16:19 +0000 (13:16 -0500)
commit16b08444dae47eded183f63300908b49cf6b2c1a
tree32976263d71b7f2528ee29b2a4bb27de107db6f2
parent993b769524b5e39aa5749a64e0389f01427235ee
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