streamlet-examples/streamlet-common.h
branchv_0
changeset 66 8a8b6434e4bb
parent 63 8c6885543e2c
child 67 0766d298eb1c
--- a/streamlet-examples/streamlet-common.h	Mon Jan 27 00:29:56 2020 +0100
+++ b/streamlet-examples/streamlet-common.h	Mon Jan 27 00:43:39 2020 +0100
@@ -155,8 +155,8 @@
 	}
 
 	virtual void processWaitingForVersion(Message& m) {
-		// TODO: check that 1 is supported
-		write({S::VERSION_ACCEPTED, L"1"});
+		for (std::wstring v : versionsSupported) if (v == L"1") return write({S::VERSION_ACCEPTED, L"1"});
+		write({S::STREAMLET_ERROR, L"INCOMPATIBLE_VERSION", L"Only version 1 is supported by this streamlet."});
 	}
 
 	virtual void processRelationStart(Message& m) {