summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-01-08 20:32:17 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-02-20 22:24:31 -0600
commit6f15500ced186fa9a3fc50404c93903953018164 (patch)
treebf0c60c13a60c6518ca8fa9c043c64ff8511e771 /main/channel.c
parent6400f5f309a47e66b94c9befecd862ccd2b73aee (diff)
res_pjsip_authenticator_digest.c: Fix sorcery's immutable contract violation.
The inbound authentication object is supposed to be immutable when it is stored in sorcery. However, the immutable property is violated if the authentication object does not have a realm set. The immutable contract violation has a different effect depending upon what sorcery back end is used. If it is the config file back end you would get the same object back until res_pjsip is reloaded. If it is the real-time or AstDB back end you would get a new object on each query. If it is cached you would get the same object back until it is refreshed from the database. Once an inbound authentication object has its realm set it may or may not get updated again if the default_realm changes. If the same authentication object is used for inbound and outbound authentication then the immutable violation can make it very hard to determine why the outbound authentication now fails. The only diagnostic message is a complaint about no realms matching when it had worked earlier. It fails because of the difference in behaviour for an empty realm setting between inbound and outbound authentication objects. * Fixed the sorcery object immutable violation by creating a new object and setting the default_realm on it instead. The new object is a shallow copy for speed. * The auth_store thread storage no longer holds an auth ref. It interferes with the shallow copy and never needed a ref anyway. ASTERISK-26799 #close Change-Id: I2328a52f61b78ed5fbba38180b7f183ee7e08956
Diffstat (limited to 'main/channel.c')
0 files changed, 0 insertions, 0 deletions