SF.net SVN: logwatch:[92] scripts/logwatch.pl

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 92
          http://logwatch.svn.sourceforge.net/logwatch/?rev=92&view=rev
Author:   mtremaine
Date:     2012-04-14 17:07:36 +0000 (Sat, 14 Apr 2012)
Log Message:
-----------
Patch for hostformat warnings about OUTFILE from msbc -mgt

Modified Paths:
--------------
    scripts/logwatch.pl

Modified: scripts/logwatch.pl
===================================================================
--- scripts/logwatch.pl	2012-04-14 15:15:44 UTC (rev 91)
+++ scripts/logwatch.pl	2012-04-14 17:07:36 UTC (rev 92)
@@ -1428,24 +1428,26 @@
    }
 
 #Printing starts here $out_mime $out_head $out_reference $out_body $out_foot
-   print OUTFILE $out_mime if $out_mime;
-   if ( $Config{'encode'} eq "base64" ) {
-      print OUTFILE encode_base64($out_head) if $out_head;
-      print OUTFILE encode_base64($out_reference) if $out_reference;
-      foreach ( 0 .. $index_par ) {
-         print OUTFILE encode_base64($out_body{$_}) if defined( $out_body{$_} );
+   if (defined fileno OUTFILE) {
+      print OUTFILE $out_mime if $out_mime;
+      if ( $Config{'encode'} eq "base64" ) {
+         print OUTFILE encode_base64($out_head) if $out_head;
+         print OUTFILE encode_base64($out_reference) if $out_reference;
+         foreach ( 0 .. $index_par ) {
+            print OUTFILE encode_base64($out_body{$_}) if defined( $out_body{$_} );
 #fixme
-         $out_body{$_} = ''; #We should track this down out_body could be an array instead also -mgt
+            $out_body{$_} = ''; #We should track this down out_body could be an array instead also -mgt
+         }
+         print OUTFILE encode_base64($out_foot) if $out_foot;
+      } else {
+         print OUTFILE $out_head if $out_head;
+         print OUTFILE $out_reference if $out_reference;
+         foreach ( 0 .. $index_par ) {
+            print OUTFILE $out_body{$_} if defined( $out_body{$_} );
+            $out_body{$_} = '';
+         }
+         print OUTFILE $out_foot if $out_foot;
       }
-      print OUTFILE encode_base64($out_foot) if $out_foot;
-   } else {
-      print OUTFILE $out_head if $out_head;
-      print OUTFILE $out_reference if $out_reference;
-      foreach ( 0 .. $index_par ) {
-         print OUTFILE $out_body{$_} if defined( $out_body{$_} );
-         $out_body{$_} = '';
-      }
-      print OUTFILE $out_foot if $out_foot;
    }
 #ends here
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.