]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis_device_state: Unsubscribe should remove old subscriptions
authorSergej Kasumovic <sergej@bicomsystems.com>
Thu, 20 Jul 2017 13:08:05 +0000 (15:08 +0200)
committerSergej Kasumovic <sergej@bicomsystems.com>
Tue, 25 Jul 2017 12:55:41 +0000 (14:55 +0200)
commit708cdc0b8e89774e3e5d3634c60939c1ff8911ab
treea6c4e7e8523046211816404a8fdda6c7f2409104
parent9035d77296c0ec66056240526d5f6f6e54555fe3
res_stasis_device_state: Unsubscribe should remove old subscriptions

Case scenario with Applications ARI:

* Once you subscribe to deviceState with Applications REST API, it will be
added into subscription pool.

* When you unsubscribe it will remove from the device_state_subscription
hash table but not from the subscription pool.

* When you subscribe again, it will add it to pool again.

* Now you will have two subscriptions and you will receive same event
twice.

This fix should now remove deviceState subscription from pool and it
should fix unsubscribe on deviceState.

ASTERISK-27130 #close

Change-Id: I718b70d770a086e39b4ddba4f69a3c616d4476c4
res/res_stasis_device_state.c