#include "server.h"
#include "serverpool.h"
#include "parse.h"
+#include "version.h"
#include "state.pb.h"
using namespace std;
// TODO: Make case-insensitive.
// XXX: Use a Via: instead?
if (parameters.count("Server") == 0) {
- parameters.insert(make_pair("Server", "metacube/0.1"));
+ parameters.insert(make_pair("Server", SERVER_IDENTIFICATION));
} else {
for (multimap<string, string>::iterator it = parameters.begin();
it != parameters.end();
if (it->first != "Server") {
continue;
}
- it->second = "metacube/0.1 (reflecting: " + it->second + ")";
+ it->second = SERVER_IDENTIFICATION " (reflecting: " + it->second + ")";
}
}
#include "input.h"
#include "httpinput.h"
#include "stats.h"
+#include "version.h"
#include "state.pb.h"
using namespace std;
int main(int argc, char **argv)
{
- fprintf(stderr, "\nCubemap starting.\n");
+ fprintf(stderr, "\nCubemap " SERVER_VERSION " starting.\n");
struct timeval serialize_start;
bool is_reexec = false;
--- /dev/null
+#ifndef _VERSION_H
+#define _VERSION_H
+
+// Version number. Don't expect this to change all that often.
+
+#define SERVER_VERSION "0.1"
+#define SERVER_IDENTIFICATION "Cubemap/" SERVER_VERSION
+
+#endif // !defined(_VERSION_H)