Skip to content
Snippets Groups Projects
Commit 4f0cb30f authored by Russell Bryant's avatar Russell Bryant
Browse files

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
parent 54bc2c20
No related branches found
No related tags found
No related merge requests found
...@@ -731,10 +731,13 @@ static u_char *ast_var_Version(struct variable *vp, oid *name, size_t *length, ...@@ -731,10 +731,13 @@ static u_char *ast_var_Version(struct variable *vp, oid *name, size_t *length,
switch (vp->magic) { switch (vp->magic) {
case ASTVERSTRING: 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: case ASTVERTAG:
long_ret = ASTERISK_VERSION_NUM; sscanf(ast_get_version_num(), "%lu", &long_ret);
return (u_char *)&long_ret; return (u_char *)&long_ret;
default: default:
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment