[Asterisk-code-review] res pjsip pubsub: Correctly implement persisted subscriptions (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Mon Feb 13 17:59:44 CST 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/4916 )
Change subject: res_pjsip_pubsub: Correctly implement persisted subscriptions
......................................................................
Patch Set 2: Code-Review-1
(5 comments)
I've tested/tried the earlier patch. These are minor nits.
https://gerrit.asterisk.org/#/c/4916/2/res/res_pjsip_exten_state.c
File res/res_pjsip_exten_state.c:
Line 358: ast_log(LOG_NOTICE, "Extension state subscription failed from '%s': "
Endpoint '%s' extension state subscription failed: ...
https://gerrit.asterisk.org/#/c/4916/2/res/res_pjsip_pubsub.c
File res/res_pjsip_pubsub.c:
PS2, Line 497: enum sip_persistence_update_flags {
: /*! When updating persistence, leave the packet buffer alone */
: PERSISTENCE_DONT_UPDATE_PACKET = 0,
: /*! When updating persistence, update the packet buffer from the rdata */
: PERSISTENCE_UPDATE_PACKET = 1 << 0,
: };
Micromanager!
You are telling subscription_persistence_update() how to do its job by the way these flags are defined. Telling a function how to do its job means that the caller knows too much about what the function does.
Line 3571: ast_debug(3, "evsub %p state %s event %s sub_tree %p sub_tree state %s\n", evsub,
Not sure about this debug message. It is just listing off variables with little context.
"event:%p state:%s event:%s sub_tree:%p sub_tree state:%s\n"
Line 3572: pjsip_evsub_get_state_name(evsub), pjsip_event_str(event->type), sub_tree,
sub_tree being NULL will cause a crash on solaris.
Line 3619: ast_log(LOG_ERROR, "Possible terminate race prevented %p %d\n", sub_tree->evsub, sub_tree->state);
Promoting debug to ERROR?
--
To view, visit https://gerrit.asterisk.org/4916
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c605fc1e3923f466a74db087d5ab6f90abce68e
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list