[Asterisk-code-review] taskprocessor: Enable subsystems and overload by subsystem (asterisk[13])

George Joseph asteriskteam at digium.com
Wed Feb 20 08:27:15 CST 2019


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

Change subject: taskprocessor:  Enable subsystems and overload by subsystem
......................................................................


Patch Set 7:

(4 comments)

https://gerrit.asterisk.org/#/c/11001/7/main/taskprocessor.c
File main/taskprocessor.c:

https://gerrit.asterisk.org/#/c/11001/7/main/taskprocessor.c@94
PS7, Line 94: 	/*! \brief Anything before the first '/' in the name (if there is one) */
            : 	char *subsystem;
            : 	/*! \brief Friendly name of the taskprocessor */
            : 	char *name;
> One of these can be eliminated as it will always be pointing to buffer. […]
Done


https://gerrit.asterisk.org/#/c/11001/7/main/taskprocessor.c@129
PS7, Line 129: static AST_VECTOR_RW(subsystem_alert_vector ,struct subsystem_alert *) overloaded_subsystems;
> Nit: no space before comma and space after comma […]
Done


https://gerrit.asterisk.org/#/c/11001/7/main/taskprocessor.c@700
PS7, Line 700: 	if (AST_VECTOR_INIT(&sorted_subsystems, AST_VECTOR_SIZE(&overloaded_subsystems))) {
> To be safe, you should get the overloaded_subsystems rd lock to
 > retrieve the vector size.  It may grow between here and copying the
 > vector and subsystem_copy() doesn't protect against vector growth
 > failure.

Seems  overkilly.  The size is just a hint to VECTOR_INIT to pre-allocate space.  If it's too small, VECTOR_ADD will cause a __make_room operation.  If that fails, you're in deep doo doo and probably won't notice the fact that a row is missing from the output.  I did fix the leak if it does fail.


https://gerrit.asterisk.org/#/c/11001/7/main/taskprocessor.c@750
PS7, Line 750: 		/* tps_alert_count becomes zero or non-zero */
> Change left in when reverting earlier change.

I miss you. :)  I replaced the "and".



-- 
To view, visit https://gerrit.asterisk.org/11001
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: I8c19068bb2fc26610a9f0b8624bdf577a04fcd56
Gerrit-Change-Number: 11001
Gerrit-PatchSet: 7
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 20 Feb 2019 14:27:15 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190220/b6d5c4f5/attachment-0001.html>


More information about the asterisk-code-review mailing list