From 4f450a464cab82dbaf57a8ea7088b515d3aecc6a Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 8 Oct 2012 10:14:43 +0200 Subject: [PATCH] Wrapped VERSION in #ifndef and moved it to the top of the file. --- components/compatido/compatidocomponent.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/compatido/compatidocomponent.cpp b/components/compatido/compatidocomponent.cpp index 848acc7e3..badffc162 100644 --- a/components/compatido/compatidocomponent.cpp +++ b/components/compatido/compatidocomponent.cpp @@ -26,6 +26,10 @@ const String CompatIdoComponent::DefaultSocketPort = "5668"; const String CompatIdoComponent::DefaultInstanceName = "i2-default"; const int CompatIdoComponent::DefaultReconnectInterval = 15; +#define PROGRAM_MODIFICATION_DATE "10-17-2012" +#ifndef VERSION +# define VERSION "2.0" +#endif /* VERSION */ /** * Reads the socket address from the config @@ -296,7 +300,7 @@ void CompatIdoComponent::SendHello(String instancename) << "HELLO" << "\n" << "PROTOCOL" << ": " << 2 << "\n" << "AGENT" << ": " << "I2 COMPATIDO" << "\n" - << "AGENTVERSION" << ": " << "2.0" << "\n" + << "AGENTVERSION" << ": " << VERSION << "\n" << "STARTTIME" << ": " << static_cast(Utility::GetTime()) << "\n" << "DISPOSITION" << ": " << "REALTIME" << "\n" << "CONNECTION" << ": " << "TCPSOCKET" << "\n" @@ -336,9 +340,6 @@ void CompatIdoComponent::CloseSink(void) void CompatIdoComponent::SendStartProcess(void) { /* TODO */ -#define PROGRAM_MODIFICATION_DATE "10-17-2012" -#define VERSION "2.0" - stringstream message; message << "\n" << 200 << "\n" /* processdata */