[Asterisk-code-review] res pjsip: Strip spaces from items parsed from comma-separa... (asterisk[master])

George Joseph asteriskteam at digium.com
Mon Mar 7 12:36:34 CST 2016


Hello Richard Mudgett, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/2359

to look at the new patch set (#3).

Change subject: res_pjsip:  Strip spaces from items parsed from comma-separated lists
......................................................................

res_pjsip:  Strip spaces from items parsed from comma-separated lists

Configurations like "aors = a, b, c" were either ignoring everything after "a"
or trying to look up " b".  Same for mailboxes,  ciphers, contacts and a few
others.

To fix, all the strsep(&copy, ",") calls have been wrapped in ast_strip.  To
facilitate this, ast_strip, ast_skip_blanks and ast_skip_nonblanks were
updated to handle null pointers.

In some cases, an ast_strlen_zero() test was added to skip consecutive commas.

There was also an attempt to ast_free an ast_strdupa'd string in
ast_sip_for_each_aor which was causing a SEGV.  I removed it.

Although this issue was reported for realtime, the issue was in the res_pjsip
modules so all config mechanisms were affected.

ASTERISK-25829 #close
Reported-by: Mateusz Kowalski

Change-Id: I0b22a2cf22a7c1c50d4ecacbfa540155bec0e7a2
---
M channels/pjsip/dialplan_functions.c
M include/asterisk/strings.h
M res/res_pjsip/config_transport.c
M res/res_pjsip/location.c
M res/res_pjsip/pjsip_configuration.c
M res/res_pjsip/pjsip_options.c
M res/res_pjsip_endpoint_identifier_ip.c
M res/res_pjsip_mwi.c
M res/res_pjsip_notify.c
M res/res_pjsip_path.c
M res/res_pjsip_pubsub.c
M res/res_pjsip_registrar.c
12 files changed, 69 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/59/2359/3
-- 
To view, visit https://gerrit.asterisk.org/2359
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0b22a2cf22a7c1c50d4ecacbfa540155bec0e7a2
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list