Added support for release names through ./configure RELEASE=name

This commit is contained in:
Thulinma 2012-10-23 11:26:25 +02:00
parent bd7433f22b
commit 0ffce1084a
2 changed files with 6 additions and 3 deletions

View file

@ -40,6 +40,10 @@ AC_CHECK_FUNCS([dup2 gettimeofday memset mkdir socket strerror])
AC_SUBST([global_CFLAGS], [-funsigned-char]) AC_SUBST([global_CFLAGS], [-funsigned-char])
#allow release names
AC_ARG_VAR([RELEASE], [Sets a specific release name])
AC_DEFINE_UNQUOTED([RELEASE], ["$RELEASE"])
#allow verbose mode compiles #allow verbose mode compiles
AC_ARG_ENABLE([verbose], AC_HELP_STRING([--enable-verbose], [Compile with verbose messages]), AC_ARG_ENABLE([verbose], AC_HELP_STRING([--enable-verbose], [Compile with verbose messages]),
AC_DEFINE([DEBUG], [4])) AC_DEFINE([DEBUG], [4]))

View file

@ -668,7 +668,7 @@ int main(int argc, char ** argv){
it->H.Clean(); it->H.Clean();
it->H.SetHeader("Content-Type", "text/html"); it->H.SetHeader("Content-Type", "text/html");
it->H.SetHeader("X-Info", "To force an API response, request the file /api"); it->H.SetHeader("X-Info", "To force an API response, request the file /api");
it->H.SetHeader("Server", "mistserver/" PACKAGE_VERSION "/" + Util::Config::libver); it->H.SetHeader("Server", "mistserver/" PACKAGE_VERSION "/" + Util::Config::libver + "/" RELEASE);
it->H.SetBody(std::string((char*)server_html, (size_t)server_html_len)); it->H.SetBody(std::string((char*)server_html, (size_t)server_html_len));
it->C.Send(it->H.BuildResponse("200", "OK")); it->C.Send(it->H.BuildResponse("200", "OK"));
it->H.Clean(); it->H.Clean();
@ -685,8 +685,7 @@ int main(int argc, char ** argv){
//sent current configuration, no matter if it was changed or not //sent current configuration, no matter if it was changed or not
//Response["streams"] = Storage["streams"]; //Response["streams"] = Storage["streams"];
Response["config"] = Controller::Storage["config"]; Response["config"] = Controller::Storage["config"];
Controller::checkCapable(Response["capabilities"]); Response["config"]["version"] = PACKAGE_VERSION "/" + Util::Config::libver + "/" RELEASE;
Response["config"]["version"] = PACKAGE_VERSION "/" + Util::Config::libver;
Response["streams"] = Controller::Storage["streams"]; Response["streams"] = Controller::Storage["streams"];
//add required data to the current unix time to the config, for syncing reasons //add required data to the current unix time to the config, for syncing reasons
Response["config"]["time"] = Util::epoch(); Response["config"]["time"] = Util::epoch();