# HG changeset patch # User František Kučera # Date 1580082219 -3600 # Node ID 8a8b6434e4bb6ca6060be66d268c06964f2398da # Parent 6944a03fb88306993ea4d8a3f1c3831a75f44d98 streamlet examples: common functions in C/C++: check supported version diff -r 6944a03fb883 -r 8a8b6434e4bb streamlet-examples/streamlet-common.h --- 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) {