X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXMsg.pm;h=f916ff5405da91ca8d27ea4a5383426414fd3070;hp=47a8e67466e64d9d9c6a3dbbd854669b775c0714;hb=369fa20a2fa54c3220727e003d30fdd19a7ec6fd;hpb=624a291612bd3adf9dc02ec813a213109331b4c9 diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 47a8e674..f916ff54 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -136,12 +136,15 @@ sub process $self->send(DXProt::pc33($f[2], $f[1], $f[3]));# acknowledge it # get the next msg no - note that this has NOTHING to do with the stream number in PC protocol - my $msgno = next_transno("Msgno") if !$ref->{file}; - - $ref->store($ref->{lines}); # store it (whatever that may mean) + # store the file or message + # remove extraneous rubbish from the hash + # remove it from the work in progress vector + # stuff it on the msg queue + $ref->{msgno} = next_transno("Msgno") if !$ref->{file}; + $ref->store($ref->{lines}); $ref->workclean; - delete $work{"$f[1]$f[2]$f[3]"}; # remove the reference from the work vector - push @msg, $ref; # add this message to the incore message list + delete $work{"$f[1]$f[2]$f[3]"}; + push @msg, $ref; } last SWITCH; } @@ -225,6 +228,7 @@ sub store print $fh "=== $ref->{msgno}^$ref->{to}^$ref->{from}^$ref->{t}^$ref->{private}^$ref->{subject}^$ref->{origin}^$ref->{read}\n"; print $fh "=== $ref->{fromnode}\n"; my $line; + $ref->{size} = 0; foreach $line (@{$lines}) { $ref->{size} += (length $line) + 1; print $fh "$line\n";