[Asterisk-code-review] Fixed duplicated subscription adding (...asterisk[master])

Joshua Colp asteriskteam at digium.com
Fri Apr 5 06:19:43 CDT 2019


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11201 )

Change subject: Fixed duplicated subscription adding
......................................................................


Patch Set 2: Code-Review-1

After thinking this through more and looking at the code I don't think this is the correct solution. The only case where you can have a subscription subscribed multiple times is actually using the forwarding code. You can't directly do it. The intention of the forwarding code is to ensure that messages for one topic are forwarded to the subscribers of another. The behavior right now results in multiple messages, which is not ideal. I'm worried however that with this change once the first forward is canceled the subsequent ones are no longer in effect, so messages won't be forwarded. This goes against the intention of the forwarding.

I think there's two options:
1. As long as 1 forwarding is still active the forwarding still occurs. It is only when the last one is canceled that it stops.
2. Trying to set up forwarding again involving the same topics results in an error that they are already forwarded.

I'm not certain which is the best option really. On one hand with option 1 it would just work. On the other hand trying to forward between the same topics again seems like a bug.


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11201
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I00bd627e4cc21aba0535d2695460a04f06f6e699
Gerrit-Change-Number: 11201
Gerrit-PatchSet: 2
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: sungtae kim <pchero21 at gmail.com>
Gerrit-Comment-Date: Fri, 05 Apr 2019 11:19:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190405/8722f61a/attachment.html>


More information about the asterisk-code-review mailing list