summaryrefslogtreecommitdiff
path: root/cdr/cdr_manager.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-12-13 08:36:35 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-12-13 08:36:35 +0000
commitc8223fc9578754dfaef1b337e5f0dfff546461b4 (patch)
tree0559c99680217b78c0bda37a131b5f09794f43c6 /cdr/cdr_manager.c
parent3b96ae826e7e280bff1d16ddc50d9328c7ea70ac (diff)
Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cdr/cdr_manager.c')
-rw-r--r--cdr/cdr_manager.c6
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",