diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-13 08:36:35 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-13 08:36:35 +0000 |
commit | a41b34a63c52608e7e5c8e6aced613815461f4c2 (patch) | |
tree | 0559c99680217b78c0bda37a131b5f09794f43c6 /cdr/cdr_manager.c | |
parent | b298a3aa9b396c4055bf75104b4fb89212c44d4a (diff) |
Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr/cdr_manager.c')
-rw-r--r-- | cdr/cdr_manager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c index fea808dc6..8a4a43e1f 100644 --- a/cdr/cdr_manager.c +++ b/cdr/cdr_manager.c @@ -95,7 +95,7 @@ static int load_config(int reload) v = ast_variable_browse(cfg, cat); while (v) { if (customfields && !ast_strlen_zero(v->name) && !ast_strlen_zero(v->value)) { - if( (customfields->used + strlen(v->value) + strlen(v->name) + 14) < customfields->len) { + if ((ast_str_strlen(customfields) + strlen(v->value) + strlen(v->name) + 14) < ast_str_size(customfields)) { ast_str_append(&customfields, -1, "%s: ${CDR(%s)}\r\n", v->value, v->name); ast_log(LOG_NOTICE, "Added mapping %s: ${CDR(%s)}\n", v->value, v->name); } else { @@ -145,10 +145,10 @@ static int manager_log(struct ast_cdr *cdr) buf[0] = 0; /* Custom fields handling */ - if (customfields != NULL && customfields->used > 0) { + if (customfields != NULL && ast_str_strlen(customfields)) { memset(&dummy, 0, sizeof(dummy)); dummy.cdr = cdr; - pbx_substitute_variables_helper(&dummy, customfields->str, buf, sizeof(buf) - 1); + pbx_substitute_variables_helper(&dummy, ast_str_buffer(customfields), buf, sizeof(buf) - 1); } manager_event(EVENT_FLAG_CDR, "Cdr", |