[Home]

Summary:ASTERISK-27130: Applications ARI: Unsubscribe action for deviceStates does not remove old subscriptions properly
Reporter:Sergej Kasumovic (sergej)Labels:patch
Date Opened:2017-07-14 01:59:13Date Closed:2017-08-16 06:47:48
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_stasis_device_state
Versions:14.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) device_state_unsubscribe.diff
Description:This was found by a team member while using ARI with Asterisk 14, but it probably affects all versions - 13/14/master.

Description is as following:
* Once you subscribe to deviceState with Applications REST API, it will be added into deviceStateSubscription list and into subscription pool.
* When you unsubscribe it will remove from the deviceStateSubscription list 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.

Attaching patch for quick preview, before pushing to Gerrit.
Comments:By: Asterisk Team (asteriskteam) 2017-07-14 01:59:13.967-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2017-07-19 13:01:06.634-0500

[~sergej], thanks for the report and patch, please ahead and push this onto Gerrit.