Changeset 34

Show
Ignore:
Timestamp:
04/26/07 11:01:09 (2 years ago)
Author:
root
Message:

More regexp optimizations and debugs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/op_server.pl

    r33 r34  
    23172317 
    23182318    my $uniqueid = find_uniqueid( $canalsesion, $server ); 
    2319     if ( $uniqueid ne "" ) { 
     2319    if ( $uniqueid ) { 
    23202320        if ( defined( $datos{$uniqueid}{CallerID} ) ) { 
    23212321            $calleridnum = $datos{$uniqueid}{CallerID}; 
     
    26532653    while ( my ( $key, $val ) = each(%bloque) ) { 
    26542654        if ( defined($val) ) { 
    2655             $val =~ s/(.*)\s+$/$1/g
     2655            $val =~ s/\s+$//
    26562656        } 
    26572657        else { 
     
    29482948            } 
    29492949 
    2950             while ( ( $key, $val ) = each(%mute_other) ) { 
    2951                 log_debug( "Mute other after originate failure: $key = $val", 16 ) if DEBUG; 
    2952             } 
    2953             while ( ( $key, $val ) = each(%pending_uniqueid_attendant) ) { 
    2954                 log_debug( "Pending uniqueid attendant after originate failure: $key = $val", 16 ) if DEBUG; 
    2955             } 
     2950            if (DEBUG) { 
     2951                while ( ( $key, $val ) = each(%mute_other) ) { 
     2952                    log_debug( "Mute other after originate failure: $key = $val", 16 ); 
     2953                } 
     2954                while ( ( $key, $val ) = each(%pending_uniqueid_attendant) ) { 
     2955                    log_debug( "Pending uniqueid attendant after originate failure: $key = $val", 16 ); 
     2956                } 
     2957            } 
     2958 
    29562959            my $tempval = $config->{$contexto}{'attendant_failure_redirect_to'}; 
    29572960            $tempval =~ s/\${CHANNEL}/$hash_temporal{Channel}/g; 
     
    33873390                # in op_buttons.cfg. 
    33883391                $canal = $extension_transfer_reverse{$ext_transf_key}; 
    3389                 $canal =~ s/(.*)&(.*)/$1/g
     3392                ($canal, undef) = split( /&/, $canal)
    33903393                if ( $canal =~ /\^/ ) { 
    3391                     my @pedacete = split( /\^/, $canal ); 
    3392                     $canal = $pedacete[1]; 
     3394                    (undef, $canal) = split( /\^/, $canal ); 
    33933395                } 
    33943396            } 
     
    51955197 
    51965198    my $cuantos = $#return + 1; 
    5197     log_debug( "$heading returns $cuantos", 16 ) if DEBUG; 
    5198     foreach (@return) { 
    5199         log_debug( "$heading END SUB returns $_", 32 ) if DEBUG
     5199        if (DEBUG) { 
     5200        log_debug( "$heading returns $cuantos", 16 ); 
     5201        log_debug( "$heading END SUB returns $_", 32 ) foreach (@return)
    52005202    } 
    52015203    $tab = substr( $tab, 0, -1 ); 
     
    52755277    @fake_bloque = (); 
    52765278 
    5277     # delete $datos{""}; 
    52785279    foreach my $blaque (@blique) { 
    52795280