fold version macros into runtime functions to avoid cascade rebuilds when modifying the core

This commit is contained in:
Anthony Minessale
2014-01-17 01:54:47 +05:00
parent 104ce2a35f
commit 8dfbd91a3d
22 changed files with 157 additions and 39 deletions
+3 -2
View File
@@ -57,7 +57,6 @@
*
*/
#include <switch.h>
#include <switch_version.h>
#ifdef _MSC_VER
#pragma warning(disable:4142)
#endif
@@ -811,6 +810,7 @@ abyss_bool handler_hook(TSession * r)
const char *uri = 0;
TRequestInfo *info = 0;
switch_event_t *evnt = 0; /* shortcut to stream.param_event */
char v[256] = "";
if (!r || !(info = &r->requestInfo) || !(uri = info->uri)) {
return FALSE;
@@ -1008,7 +1008,8 @@ abyss_bool handler_hook(TSession * r)
}
/* Generation of the server field */
ResponseAddField(r, "Server", "FreeSWITCH-" SWITCH_VERSION_FULL "-mod_xml_rpc");
switch_sprintf(v, sizeof(v), "FreeSWITCH-%s-mod_xml_rpc", switch_version_full());
ResponseAddField(r, "Server", v);
if (html) {
ResponseAddField(r, "Content-Type", "text/html");