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

sungtae kim asteriskteam at digium.com
Thu Apr 4 19:09:12 CDT 2019


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

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


Patch Set 2:

(2 comments)

> Patch Set 1: Code-Review-1
> 
> (2 comments)

I've fixed it as your comments. :)

https://gerrit.asterisk.org/#/c/11201/1/main/stasis.c 
File main/stasis.c:

https://gerrit.asterisk.org/#/c/11201/1/main/stasis.c@1040 
PS1, Line 1040: 	tmp_subscription = AST_VECTOR_GET_CMP(&topic->subscribers, sub, TOPIC_SUBSCRIPTION_CMP);
              : 	if (!tmp_subscription) {
              : 		AST_VECTOR_APPEND(&topic->subscribers, sub);
              : 	}
> I think this behavior needs to be documented in the stasis.h for subscribing.
Np. Added description into stasis.h.


https://gerrit.asterisk.org/#/c/11201/1/main/stasis.c@1051 
PS1, Line 1051: ast_str_container_add(topic->statistics->subscribers, stasis_subscription_uniqueid(sub));
              : 	ast_str_container_add(sub->statistics->topics, stasis_topic_name(topic));
> These will result in additional information being added as well.
You're right. Added duplicating check.



-- 
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 00:09:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190404/1937507f/attachment-0001.html>


More information about the asterisk-code-review mailing list