mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Convert this file over the new method of getting the Asterisk version.
(I don't have this building on this machine, so caio1982 on IRC is going to test it for me. :) ) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -731,10 +731,13 @@ static u_char *ast_var_Version(struct variable *vp, oid *name, size_t *length,
|
||||
|
||||
switch (vp->magic) {
|
||||
case ASTVERSTRING:
|
||||
*var_len = strlen(ASTERISK_VERSION);
|
||||
return (u_char *)ASTERISK_VERSION;
|
||||
{
|
||||
const char *version = ast_get_version();
|
||||
*var_len = strlen(version);
|
||||
return (u_char *)version;
|
||||
}
|
||||
case ASTVERTAG:
|
||||
long_ret = ASTERISK_VERSION_NUM;
|
||||
sscanf(ast_get_version_num(), "%lu", &long_ret);
|
||||
return (u_char *)&long_ret;
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user