[Asterisk-code-review] devicestate: Don't create topic when change isn't cached. (asterisk[13])

George Joseph asteriskteam at digium.com
Wed Jul 25 13:03:27 CDT 2018


George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/9658 )

Change subject: devicestate: Don't create topic when change isn't cached.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/9658/1/main/devicestate.c
File main/devicestate.c:

https://gerrit.asterisk.org/#/c/9658/1/main/devicestate.c@761
PS1, Line 761: 	/* When this device state change is not cached we only publish
             : 	 * on its own pool topic if one already exists. This means that
             : 	 * something external is explicitly monitoring it.
             : 	 */
             : 	if (cachable || stasis_topic_pool_check_topic(device_state_topic_pool, device)) {
             : 		topic = ast_device_state_topic(device);
             : 	} else {
             : 		topic = ast_device_state_topic_all();
             : 	}
I'm not following how the logic matches your description.  Does check topic return true if it's NOT cached?


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

https://gerrit.asterisk.org/#/c/9658/1/main/stasis.c@1201
PS1, Line 1201: stasis_topic_pool_check_topic
Think you can rename this to something like stasis_topic_pool_topic_exists?



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I18da0e8cbb18e79602e731020c46ba4101e59f0a
Gerrit-Change-Number: 9658
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Comment-Date: Wed, 25 Jul 2018 18:03:27 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180725/4b0018b5/attachment.html>


More information about the asterisk-code-review mailing list