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