[Asterisk-code-review] res_pjsip_pidf: Cisco phone presence enablement (asterisk[master])
Sean Bright
asteriskteam at digium.com
Wed Nov 6 17:26:38 CST 2019
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13162 )
Change subject: res_pjsip_pidf: Cisco phone presence enablement
......................................................................
Patch Set 3:
(1 comment)
https://gerrit.asterisk.org/c/asterisk/+/13162/3/res/res_pjsip_pubsub.c
File res/res_pjsip_pubsub.c:
https://gerrit.asterisk.org/c/asterisk/+/13162/3/res/res_pjsip_pubsub.c@854
PS3, Line 854: alloc_size = pj_strlen(&user_agent_header->hvalue) + 1;
: user_agent = ast_alloca(alloc_size);
: ast_copy_pj_str(user_agent, &user_agent_header->hvalue, alloc_size);
:
: if (strstr(user_agent,"Cisco"))
I think you could simplify this with:
static const pj_str_t CISCO_SUBSTR = { "Cisco", 5 };
if (pj_stristr(user_agent, CISCO_SUBSTR))
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13162
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ib5a2944de0e280d3c92eed42d91a0bcb0bcf387c
Gerrit-Change-Number: 13162
Gerrit-PatchSet: 3
Gerrit-Owner: snuffy <snuffy22 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Wed, 06 Nov 2019 23:26:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191106/af4d1bc4/attachment-0001.html>
More information about the asterisk-code-review
mailing list