From 9869c77856784c365374e960da4abb9920954499 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 1 Jul 2016 17:08:01 +0200 Subject: [PATCH] enable push to send empty files --- clusterd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clusterd b/clusterd index 4c7a88a..5a0d3a7 100755 --- a/clusterd +++ b/clusterd @@ -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) {