[Asterisk-code-review] core_local: Fix local channel parsing with slashes (asterisk[master])

N A asteriskteam at digium.com
Tue Apr 26 15:05:37 CDT 2022


Attention is currently required from: Joshua Colp, Richard Mudgett.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18369 )

Change subject: core_local: Fix local channel parsing with slashes
......................................................................


Patch Set 4:

(3 comments)

Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/18369/comment/23894008_3e170179 
PS3, Line 16: For instance, something like DAHDI/5 or PJSIP/device
> Yes, I realize that. However, pattern matching a device name also works. […]
Ack


File main/core_local.c:

https://gerrit.asterisk.org/c/asterisk/+/18369/comment/db558d9b_e12f0d9b 
PS3, Line 317: 		if (*ptr != '/' && *ptr != 'n' && *ptr != 'j' && *ptr != 'm' && *ptr != 'b') {
> It's admittedly somewhat of a hack, but I couldn't think of a better way to deduce whether or not it […]
Ack


https://gerrit.asterisk.org/c/asterisk/+/18369/comment/9eda9e22_ae1492ba 
PS3, Line 907: 	if ((opts = strrchr(parse, '/')) && really_local_options(opts)) {
> I will eventually give this some thought unless someone else chimes in before. […]
Actually, upon further thought, I think this is the only way to do it and I don't think it will be a problem, since we bail out if the '@' is missing. So simply reversing the order of grabbing the '@' and the '/' allows us to look for a slash in the context and this will always guarantee correct behavior.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I8e85bc14072e452d0537a801aba17779569d0360
Gerrit-Change-Number: 18369
Gerrit-PatchSet: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 26 Apr 2022 20:05:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220426/f119fa9e/attachment.html>


More information about the asterisk-code-review mailing list