[Asterisk-code-review] res pjsip pubsub: Prevent unload except during shutdown. (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Thu Oct 19 09:50:33 CDT 2017


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/6833 )

Change subject: res_pjsip_pubsub: Prevent unload except during shutdown.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/6833/1/res/res_pjsip_pubsub.c
File res/res_pjsip_pubsub.c:

https://gerrit.asterisk.org/#/c/6833/1/res/res_pjsip_pubsub.c@5418
PS1, Line 5418: 	if (ast_sip_register_service(&pubsub_module)) {
> I'm fairly confident it's safe to move this registration to occur after sor
>From what I can tell calling this first appears to be okay. Except maybe for the one caveat I'll mention below.


https://gerrit.asterisk.org/#/c/6833/1/res/res_pjsip_pubsub.c@5428
PS1, Line 5428: 	pjsip_evsub_init_module(ast_sip_get_pjsip_endpoint());
After looking into your other question (I took a peek at the pjsip source) I noticed a call to pjsip_evsub_init_module can return failure. For instance if it fails to register its own module. I know we were not doing it before, but we probably want to check this functions return as well.

Maybe put it just before or after ast_sip_register_service (before teh call to shutdown_ref)? Or check them in the same "if"?



-- 
To view, visit https://gerrit.asterisk.org/6833
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iee900f20bdd6ee1bfe23efdec0d87765eadce8a7
Gerrit-Change-Number: 6833
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 19 Oct 2017 14:50:33 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171019/44d9dc7f/attachment-0001.html>


More information about the asterisk-code-review mailing list