[Asterisk-code-review] sd notify (systemd status notifications) support (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Fri Aug 5 08:37:10 CDT 2016
Corey Farrell has posted comments on this change.
Change subject: sd_notify (systemd status notifications) support
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/3094/3/main/loader.c
File main/loader.c:
Line 974: ast_sd_notify("READY=1");
Sorry I didn't catch this on the second revision.
In the success case this will cause ast_sd_notify("READY=1") to be called twice. This is unlikely to be a problem except in a rare race between two thread doing reload.
More importantly when res == AST_MODULE_RELOAD_QUEUED or AST_MODULE_RELOAD_IN_PROGRESS it is inappropriate for us to notify READY=1 (times when reloadlock was never held).
This can be fixed in a couple ways. One thought:
module_reload_done:
ast_sd_notify(..);
ast_mutex_unlock(..);
module_reload_exit:
publish_reload_message(..);
return res;
This way 'goto module_reload_done' will be used in all cases where reloadlock is being held. You would remove the unlock before each 'goto module_reload_done'. The first two 'goto module_reload_exit' would be untouched as the lock was never acquired and ast_sd_notify never called.
--
To view, visit https://gerrit.asterisk.org/3094
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied6a59dafd5ef331c5c7ae8f3ccd2dfc94be7811
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list