[Asterisk-code-review] res_pjsip_caller_id: Add ANI2/OLI parsing (asterisk[master])

George Joseph asteriskteam at digium.com
Fri Jun 11 09:16:56 CDT 2021


Attention is currently required from: N A.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16041 )

Change subject: res_pjsip_caller_id: Add ANI2/OLI parsing
......................................................................


Patch Set 3: Code-Review-1

(3 comments)

File res/res_pjsip_caller_id.c:

https://gerrit.asterisk.org/c/asterisk/+/16041/comment/5af40140_730f1843 
PS3, Line 136: 	char oli[4];
oli needs to be large enough to hold the string representation of the largest integer you expect, plus the null terminator.
Use a define like the following if the integer can have a max of 4 digits...
#define MAX_OLI_INT_LENGTH 4
then
char oli[MAX_OLI_INT_LENGTH + 1];


https://gerrit.asterisk.org/c/asterisk/+/16041/comment/8d246e01_dfea51b7 
PS3, Line 147: 		ast_copy_pj_str(oli, &oli1->value, sizeof(oli));
Replace sizeof(oli) with MAX_OLI_DIGITS.


https://gerrit.asterisk.org/c/asterisk/+/16041/comment/ca62c669_75aa330f 
PS3, Line 148: 		return ast_str_to_int(oli1->value.ptr, ani2);
You're still using the pj_str directly.  You need to use oli now.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16041
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ifc938a7a7d45ce33999ebf3656a542226f6d3847
Gerrit-Change-Number: 16041
Gerrit-PatchSet: 3
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Fri, 11 Jun 2021 14:16:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210611/2b8856c8/attachment-0001.html>


More information about the asterisk-code-review mailing list