Use ast_str_strlen() instead of recalculating the string length.
authorSean Bright <sean@malleable.com>
Sat, 13 Dec 2008 18:25:58 +0000 (18:25 +0000)
committerSean Bright <sean@malleable.com>
Sat, 13 Dec 2008 18:25:58 +0000 (18:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164054 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/snmp/agent.c

index 9633aa1..6af14db 100644 (file)
@@ -483,7 +483,7 @@ static u_char *ast_var_channels_table(struct variable *vp, oid *name, size_t *le
                break;
        case ASTCHANVARIABLES:
                if (pbx_builtin_serialize_variables(chan, &out)) {
-                       *var_len = strlen(ast_str_buffer(out));
+                       *var_len = ast_str_strlen(out);
                        ret = (u_char *)ast_str_buffer(out);
                }
                break;