Skip to content

Commit

Permalink
enable push to send empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jul 1, 2016
1 parent 4f46568 commit 9869c77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@ sub push_file {
$st->type eq 'F' or die "$filename: not a plain file\n";
$st->size<=65536 or die "$filename: to big for broadcast (max 65536 bytes)\n";

if ($st->size==0) {
udp_broadcast_message($donald_s,'filedata',$st,0,'');
return;
}

my $fh=new IO::File $filename,'<' or return warn "$filename: $!\n";
my $i=0;
for (my $pos=0;$pos<$st->size;$pos+=1024) {
Expand Down

0 comments on commit 9869c77

Please sign in to comment.