--- wu-ftpd-2.6.2.orig/util/xferstats
+++ wu-ftpd-2.6.2/util/xferstats
@@ -43,13 +43,13 @@
 #
 # edit the next two lines to customize for your domain.
 # This will allow your domain to be seperated in the domain listing.
-$hostname = `hostname`;
+$hostname = `hostname -f`;
 $hostname =~ y/A-Z/a-z/;
 @DomainName = split /\./, $hostname;
-$mydom2 = pop(@DomainName);
+$mydom2 = pop(@DomainName); chop ($mydom2);
 $mydom1 = pop(@DomainName);
 # edit the next line to customize for your default log file
-$usage_file = "/var/log/xferlog";
+$usage_file = "/var/log/wu-ftpd/xferlog";
 
 # Edit the following lines for default report settings.
 # Entries defined here will be over-ridden by the command line.
@@ -58,9 +58,10 @@
 $opt_d = 0;
 $opt_t = 1;
 $opt_l = 3;
+$opt_q = 0;
 
 require 'getopts.pl';
-&Getopts('f:rahdD:l:s:');
+&Getopts('f:rahdD:l:s:q');
 
 if ($opt_r) { $real = 1;}
 if ($opt_a) { $anon = 1;}
@@ -155,7 +156,10 @@
 @syslist = keys(systemfiles);
 @dates = sort datecompare keys(xferbytes);
 
-if ($xferfiles == 0) {die "There was no data to process.\n";}
+if ($xferfiles == 0) {
+	die "There was no data to process.\n" unless ($opt_q);
+	exit 0;
+}
 
 
 print "TOTALS FOR SUMMARY PERIOD ", $dates[0], " TO ", $dates[$#dates], "\n\n";
@@ -307,8 +311,8 @@
 
    $date1  = substr($a, 11, 4) * 4800;
    $date2  = substr($b, 11, 4) * 4800;
-   $date1 += index("JanFebMarAprMayJunJulAugSepOctNovDec",substr($a, 4, 3))*100;
-   $date2 += index("JanFebMarAprMayJunJulAugSepOctNovDec",substr($b, 4, 3))*100;
+   $date1 += index("JanFebMarAprMayJunJulAugSepOctNovDec",substr($a, 4, 3)) / 3 * 400;
+   $date2 += index("JanFebMarAprMayJunJulAugSepOctNovDec",substr($b, 4, 3)) / 3 * 400;
    $date1 += substr($a, 8, 2);
    $date2 += substr($b, 8, 2);
    $date1 - $date2;
