aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/Makefile2
-rw-r--r--main/asterisk.c14
-rw-r--r--main/http.c4
-rw-r--r--main/manager.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/main/Makefile b/main/Makefile
index 364cf3169..93a306e8e 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -29,7 +29,7 @@ OBJS= io.o sched.o logger.o frame.o loader.o config.o channel.o \
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o \
strcompat.o threadstorage.o dial.o event.o adsistub.o audiohook.o \
- astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS)
+ astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS) version.o
# we need to link in the objects statically, not as a library, because
# otherwise modules will not have them available if none of the static
diff --git a/main/asterisk.c b/main/asterisk.c
index 5d995c9a7..e1b2f6acf 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -135,7 +135,7 @@ int daemon(int, int); /* defined in libresolv of all places */
/*! \brief Welcome message when starting a CLI interface */
#define WELCOME_MESSAGE \
- ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2007 Digium, Inc. and others.\n" \
+ ast_verbose("Asterisk %s, Copyright (C) 1999 - 2007 Digium, Inc. and others.\n" \
"Created by Mark Spencer <markster@digium.com>\n" \
"Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.\n" \
"This is free software, with components licensed under the GNU General Public\n" \
@@ -143,7 +143,7 @@ int daemon(int, int); /* defined in libresolv of all places */
"certain conditions. Type 'core show license' for details.\n" \
"=========================================================================\n" \
"NOTE: This is a development version of Asterisk, and should not be used in\n" \
- "production installations.\n");
+ "production installations.\n", ast_get_version());
/*! \defgroup main_options Main Configuration Options
* \brief Main configuration options from asterisk.conf or OS command line on starting Asterisk.
@@ -394,7 +394,7 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c
ast_cli(a->fd, "\nPBX Core settings\n");
ast_cli(a->fd, "-----------------\n");
- ast_cli(a->fd, " Version: %s\n", "" ASTERISK_VERSION "" );
+ ast_cli(a->fd, " Version: %s\n", ast_get_version());
if (option_maxcalls)
ast_cli(a->fd, " Max. calls: %d (Current %d)\n", option_maxcalls, ast_active_channels());
else
@@ -980,7 +980,7 @@ static void *netconsole(void *vconsole)
if (gethostname(hostname, sizeof(hostname)-1))
ast_copy_string(hostname, "<Unknown>", sizeof(hostname));
- snprintf(tmp, sizeof(tmp), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ASTERISK_VERSION);
+ snprintf(tmp, sizeof(tmp), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ast_get_version());
fdprint(con->fd, tmp);
for (;;) {
fds[0].fd = con->fd;
@@ -1515,7 +1515,7 @@ static char *handle_version(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
if (a->argc != 3)
return CLI_SHOWUSAGE;
ast_cli(a->fd, "Asterisk %s built by %s @ %s on a %s running %s on %s\n",
- ASTERISK_VERSION, ast_build_user, ast_build_hostname,
+ ast_get_version(), ast_build_user, ast_build_hostname,
ast_build_machine, ast_build_os, ast_build_date);
return CLI_SUCCESS;
}
@@ -2387,12 +2387,12 @@ static void ast_remotecontrol(char * data)
static int show_version(void)
{
- printf("Asterisk " ASTERISK_VERSION "\n");
+ printf("Asterisk %s\n", ast_get_version());
return 0;
}
static int show_cli_help(void) {
- printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2007, Digium, Inc. and others.\n");
+ printf("Asterisk %s, Copyright (C) 1999 - 2007, Digium, Inc. and others.\n", ast_get_version());
printf("Usage: asterisk [OPTIONS]\n");
printf("Valid Options:\n");
printf(" -V Display version number and exit\n");
diff --git a/main/http.c b/main/http.c
index 485211192..c7ea804fc 100644
--- a/main/http.c
+++ b/main/http.c
@@ -186,7 +186,7 @@ static struct ast_str *static_callback(struct server_instance *ser, const char *
"Cache-Control: no-cache, no-store\r\n"
"Content-Length: %d\r\n"
"Content-type: %s\r\n\r\n",
- ASTERISK_VERSION, buf, (int) st.st_size, mtype);
+ ast_get_version(), buf, (int) st.st_size, mtype);
while ((len = read(fd, buf, sizeof(buf))) > 0)
fwrite(buf, 1, len, ser->f);
@@ -847,7 +847,7 @@ static void *httpd_helper_thread(void *data)
"Date: %s\r\n"
"Connection: close\r\n"
"%s",
- status, title ? title : "OK", ASTERISK_VERSION, timebuf,
+ status, title ? title : "OK", ast_get_version(), timebuf,
static_content ? "" : "Cache-Control: no-cache, no-store\r\n");
if (!contentlength) { /* opaque body ? just dump it hoping it is properly formatted */
fprintf(ser->f, "%s", out->str);
diff --git a/main/manager.c b/main/manager.c
index 30e5247d0..f57d35b68 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2222,7 +2222,7 @@ static int action_coresettings(struct mansession *s, const struct message *m)
,
idText,
AMI_VERSION,
- ASTERISK_VERSION,
+ ast_get_version(),
ast_config_AST_SYSTEM_NAME,
option_maxcalls,
option_maxload,