Browse Source

TT#24097 Use a regex for split

Change-Id: Id8543d7d792e35a736c770fc87a20fa399d68bad
changes/07/16707/2
Guillem Jover 8 years ago
parent
commit
aa2eaee95e
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      utils/rtpengine-ng-client

+ 5
- 5
utils/rtpengine-ng-client View File

@ -49,19 +49,19 @@ my $cmd = shift(@ARGV) or die;
my %packet = (command => $cmd); my %packet = (command => $cmd);
for my $x (split(',', 'from-tag,to-tag,call-id,transport protocol,media address,ICE,address family,DTLS,via-branch,media address')) {
for my $x (split(/,/, 'from-tag,to-tag,call-id,transport protocol,media address,ICE,address family,DTLS,via-branch,media address')) {
defined($options{$x}) and $packet{$x} = \$options{$x}; defined($options{$x}) and $packet{$x} = \$options{$x};
} }
for my $x (split(',', 'TOS,delete-delay')) {
for my $x (split(/,/, 'TOS,delete-delay')) {
defined($options{$x}) and $packet{$x} = $options{$x}; defined($options{$x}) and $packet{$x} = $options{$x};
} }
for my $x (split(',', 'trust address,symmetric,asymmetric,force,strict source,media handover,sip source address,reset,port latching')) {
for my $x (split(/,/, 'trust address,symmetric,asymmetric,force,strict source,media handover,sip source address,reset,port latching')) {
defined($options{$x}) and push(@{$packet{flags}}, $x); defined($options{$x}) and push(@{$packet{flags}}, $x);
} }
for my $x (split(',', 'origin,session connection')) {
for my $x (split(/,/, 'origin,session connection')) {
defined($options{'replace-' . $x}) and push(@{$packet{replace}}, $x); defined($options{'replace-' . $x}) and push(@{$packet{replace}}, $x);
} }
for my $x (split(',', 'rtcp-mux,SDES')) {
for my $x (split(/,/, 'rtcp-mux,SDES')) {
defined($options{$x}) && ref($options{$x}) eq 'ARRAY' defined($options{$x}) && ref($options{$x}) eq 'ARRAY'
and $packet{$x} = $options{$x}; and $packet{$x} = $options{$x};
} }


Loading…
Cancel
Save