summaryrefslogtreecommitdiff
path: root/res/snmp
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-01-05 23:05:35 +0000
committerRussell Bryant <russell@russellbryant.com>2008-01-05 23:05:35 +0000
commit4f0cb30f4a0fbed33b0fbd96c624dbb0e57f3ac7 (patch)
treecc9158244c41b84b160eeeb2fe2802a88c7026c0 /res/snmp
parent54bc2c20b66d919f1df26faa637774ad40b343f1 (diff)
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
Diffstat (limited to 'res/snmp')
-rw-r--r--res/snmp/agent.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/res/snmp/agent.c b/res/snmp/agent.c
index 65f0fd434..207acb8a1 100644
--- a/res/snmp/agent.c
+++ b/res/snmp/agent.c
@@ -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;