[Asterisk-code-review] stasis.c: Added topic_all container (...asterisk[16])

sungtae kim asteriskteam at digium.com
Thu Mar 7 06:51:49 CST 2019


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

Change subject: stasis.c: Added topic_all container
......................................................................


Patch Set 5:

> Patch Set 5:
> 
> > Patch Set 5:
> > 
> > > Patch Set 5: Code-Review-1
> > > 
> > > (10 comments)
> > 
> > Hi Joshua,
> > 
> > Thank you for your kind reviewing.
> > 
> > I not clear about this one.
> > 
> > >I think topic names ultimately should be unique and descriptive themselves. To that end I'm >going to be auditing the codebase and improving this for topics and subscriptions. I think >the cleanest option is probably to have this code do a check for a topic of the same name >when creating, and if one exists then to append a unique part to the end of the passed in >name. Example:
> > >
> > >A topic named "pjsip" is created.
> > >Another topic named "pjsip" is created but the code appends some unique data turning it into >"pjsip-349d93".
> > >
> > >This guarantees the topic names are unique, and as the topic names are not actually used by >the API itself - whether the name passed in is used or not doesn't actually matter.
> > 
> > Because if there's duplicated name is already, I think it should return fail or created one in general terms of the create() function's behaviour.
> > 
> > And, adding the unique part is not clear to usage. Every time, if the user creating new topic, they have to check the returned topic's name and have to think about why it has a different name in case of duplication.
> 
> Topics don't care about their name, though. They currently exist for logging and informational purposes only. Access to a topic is by pointer for efficiency purposes. The only meaning they have is the one a user has by actually reading it.


Thank you for replying. Because of, I want to use this feature, for the ARI in next step. And having unique name or unique uuid would be important.

It's about the https://issues.asterisk.org/jira/browse/ASTERISK-28227?jql=text%20~%20%22subscribe%20ari%22 

Because, having strange postfix, will make user confusing which one is what they want to subscribing it. So I want to keep the name as simple as possible.


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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ie86d125d2966f93de74ee00f47ae6fbc8c081c5f
Gerrit-Change-Number: 11013
Gerrit-PatchSet: 5
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: sungtae kim <pchero21 at gmail.com>
Gerrit-Comment-Date: Thu, 07 Mar 2019 12:51:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190307/48aa9fa0/attachment-0001.html>


More information about the asterisk-code-review mailing list