From 7c4fd58b04a870f60cc9890abf5f3ee56ea55027 Mon Sep 17 00:00:00 2001 From: postmannen Date: Tue, 14 Jun 2022 10:34:18 +0200 Subject: [PATCH] srcSubHandler checking status value --- requests_copy.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/requests_copy.go b/requests_copy.go index 1b06510..c6e7133 100644 --- a/requests_copy.go +++ b/requests_copy.go @@ -248,8 +248,14 @@ func copySrcSubHandler(cia copyInitialData) func(process, Message, string) ([]by log.Fatalf("error: copySrcSubHandler: cbor unmarshal of csa failed: %v\n", err) } - fmt.Printf("\n-----------------RECEIVED COPY READY MESSAGE IN copySrcSubHandler: %v------------------\n\n", csa.CopyStatus) + switch csa.CopyStatus { + case copyReady: + log.Printf(" * RECEIVED * copyStatus=copyReady copySrcSubHandler: %v\n\n", csa.CopyStatus) + default: + log.Fatalf("error: copySrcSubHandler: not valid copyStatus, exiting: %v\n", csa.CopyStatus) + } + // TODO: Clean up eventual tmp folders here! allDoneCh <- struct{}{} }()