summaryrefslogtreecommitdiff
path: root/main/test.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2012-01-25 21:31:28 +0000
committerKevin P. Fleming <kpfleming@digium.com>2012-01-25 21:31:28 +0000
commit9ee8a744617411d33f8c6178ab50361452482111 (patch)
treedbd57acfdaca023594cf30d088004185fc2040e5 /main/test.c
parent261cde46759765d56e559c2692a4ac4a176c6842 (diff)
Remove "asterisk/version.h" in favor of "asterisk/ast_version.h".
A long time ago, in a land far far away, we added "asterisk/ast_version.h", which provides the ast_get_version() and ast_get_version_num() functions. These were added so that modules that needed the version information for the Asterisk instance they were loaded in could actually get it (as opposed the version that they were compiled against). We changed everything in the tree to use the new mechanism (although later main/test.c was added using the old method). However, the old mechanism was never removed, and as a result, new code is still trying to use it. This commit removes asterisk/version.h and replaces it with a header that will generate a compile-time error if you try to use it (the error message tells you which header you should use instead). It also removes the Makefile and build_tools bits that generated the file, and it updates main/test.c to use the 'proper' method of getting the Asterisk version information. This is an API change and thus is being committed for trunk only, but it's a fairly minor one and definitely improves the situation for out-of-tree modules. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/test.c')
-rw-r--r--main/test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/test.c b/main/test.c
index 741c0f540..07ddc4d78 100644
--- a/main/test.c
+++ b/main/test.c
@@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
#include "asterisk/utils.h"
#include "asterisk/cli.h"
#include "asterisk/term.h"
-#include "asterisk/version.h"
+#include "asterisk/ast_version.h"
#include "asterisk/paths.h"
#include "asterisk/time.h"
#include "asterisk/manager.h"
@@ -386,14 +386,14 @@ static int test_generate_results(const char *name, const char *category, const c
last_results.total_time / 1000, last_results.total_time % 1000,
last_results.total_tests);
fprintf(f_xml, "\t<properties>\n");
- fprintf(f_xml, "\t\t<property name=\"version\" value=\"%s\"/>\n", ASTERISK_VERSION);
+ fprintf(f_xml, "\t\t<property name=\"version\" value=\"%s\"/>\n", ast_get_version());
fprintf(f_xml, "\t</properties>\n");
}
/* txt header information */
if (f_txt) {
- fprintf(f_txt, "Asterisk Version: %s\n", ASTERISK_VERSION);
- fprintf(f_txt, "Asterisk Version Number: %d\n", ASTERISK_VERSION_NUM);
+ fprintf(f_txt, "Asterisk Version: %s\n", ast_get_version());
+ fprintf(f_txt, "Asterisk Version Number: %s\n", ast_get_version_num());
fprintf(f_txt, "Number of Tests: %d\n", last_results.total_tests);
fprintf(f_txt, "Number of Tests Executed: %d\n", (last_results.total_passed + last_results.total_failed));
fprintf(f_txt, "Passed Tests: %d\n", last_results.total_passed);