[Asterisk-code-review] Fixed duplicated subscription adding (...asterisk[master])
Joshua Colp
asteriskteam at digium.com
Wed Apr 10 06:53:23 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 3: Code-Review-1
(4 comments)
https://gerrit.asterisk.org/#/c/11201/3//COMMIT_MSG
Commit Message:
https://gerrit.asterisk.org/#/c/11201/3//COMMIT_MSG@7
PS3, Line 7: Fixed duplicated subscription adding
This should have res_stasis: at the front, and also better describe the new change (regarding forwarding).
https://gerrit.asterisk.org/#/c/11201/3/include/asterisk/stasis.h
File include/asterisk/stasis.h:
https://gerrit.asterisk.org/#/c/11201/3/include/asterisk/stasis.h@137
PS3, Line 137: * It is safe to duplicate subscribing. Once the subscriber subscribes given topic
: * already, it doesn't increase subscriber reference count. So, don't have to
: * unsubscribe many times for in case of duplicated subscribing.
I don't think this should be changed due to the reason I gave regarding forwarding.
https://gerrit.asterisk.org/#/c/11201/3/main/stasis.c
File main/stasis.c:
https://gerrit.asterisk.org/#/c/11201/3/main/stasis.c@1050
PS3, Line 1050: static int topic_add_subscription(struct stasis_topic *topic, struct stasis_subscription *sub)
I don't think the changes in here are needed any longer due to the reason I previously gave, as forwarding would only cause this and it now checks.
https://gerrit.asterisk.org/#/c/11201/3/main/strings.c
File main/strings.c:
https://gerrit.asterisk.org/#/c/11201/3/main/strings.c@222
PS3, Line 222: int ast_str_container_add_uniq(struct ao2_container *str_container, const char *add)
: {
: void *tmp;
:
: tmp = ao2_find(str_container, add, OBJ_SEARCH_KEY);
: if (tmp) {
: ao2_cleanup(tmp);
: return -1;
: }
:
: return ast_str_container_add(str_container, add);
: }
No longer needed
--
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: 3
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: Wed, 10 Apr 2019 11:53:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190410/39c2b87d/attachment-0001.html>
More information about the asterisk-code-review
mailing list