[Asterisk-code-review] res stasis device state: Protect the adding/removing of subs... (asterisk[13])

Joshua Colp asteriskteam at digium.com
Tue Feb 7 10:56:14 CST 2017


Hello Kevin Harwell, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/4890

to look at the new patch set (#3).

Change subject: res_stasis_device_state: Protect the adding/removing of subscriptions.
......................................................................

res_stasis_device_state: Protect the adding/removing of subscriptions.

The adding and removing of device state subscriptions did not protect
fully against simultaneous manipulation. In particular the subscribe
case allowed a small window where two subscriptions could be added for
the same device state instead of just one.

This change makes the code hold the subscriptions lock for the entirety
of each operation to ensure that two are not occurring at the same time.

ASTERISK-26770

Change-Id: I3e7f8eb9d09de440c9024d2dd52029f6f20e725b
---
M res/res_stasis_device_state.c
1 file changed, 32 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/90/4890/3
-- 
To view, visit https://gerrit.asterisk.org/4890
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3e7f8eb9d09de440c9024d2dd52029f6f20e725b
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list