Changeset 740

Show
Ignore:
Timestamp:
01/06/07 23:05:25 (2 years ago)
Author:
mart
Message:

Fix some warnings in Connection.pm.

Thanks to Pedro Melo for the patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DJabberd/lib/DJabberd/Connection.pm

    r737 r740  
    4848 
    4949BEGIN { 
    50     my $xmldebug = $ENV{XMLDEBUG}
     50    my $xmldebug = $ENV{XMLDEBUG} || ''
    5151    eval "use constant XMLDEBUG => $xmldebug"; 
    5252 
     
    134134sub log_outgoing_data { 
    135135    my ($self, $text) = @_; 
     136    my $id = $self->{id} ||= 'no_id'; 
     137     
    136138    if($self->xmllog->is_debug) { 
    137         $self->xmllog->debug("$self->{id} > " . $text); 
     139        $self->xmllog->debug("$id > " . $text); 
    138140    } else { 
    139141        local $DJabberd::ASXML_NO_TEXT = 1; 
    140         $self->xmllog->info("$self->{id} > " . $text); 
     142        $self->xmllog->info("$id > " . $text); 
    141143    } 
    142144}