[asterisk-dev] CDR fixes--- Wait a minute!! (LONG)

Steve Murphy murf at digium.com
Wed Jun 13 16:54:42 CDT 2007


On Tue, 2007-06-12 at 23:05 +0200, Stephen Davies wrote:
> On 12/06/07, Stephen Davies <stephen.l.davies at gmail.com> wrote:
> > Maybe just maybe another fix is that ast_cdr_init should also do the
> > S_OR(s->macrocontext, s->context) stuff that ast_cdr_update does.
> 
> 
> Excuse me for talking to myself, but this does do the job.
> 
> Here's a patch:
> 
> Index: cdr.c
> ===================================================================
> --- cdr.c       (revision 67303)
> +++ cdr.c       (working copy)
> @@ -776,8 +776,8 @@
>                         cdr->amaflags = c->amaflags ? c->amaflags :
> ast_default_amaflags;
>                         ast_copy_string(cdr->accountcode,
> c->accountcode, sizeof(cdr->accountcode));
>                         /* Destination information */
> -                       ast_copy_string(cdr->dst, c->exten, sizeof(cdr->dst));
> -                       ast_copy_string(cdr->dcontext, c->context,
> sizeof(cdr->dcontext));
> +                       ast_copy_string(cdr->dst, S_OR(c->macroexten,
> c->exten), sizeof(cdr->dst));
> +                       ast_copy_string(cdr->dcontext,
> S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
>                         /* Unique call identifier */
>                         ast_copy_string(cdr->uniqueid, c->uniqueid,
> sizeof(cdr->uniqueid));
>                 }
> 
> Do you need it on the bug tracker?
> 

Steve--

The fact that this change fixes your problem blows my mind. Please, tell
me more about the exact situation. What kind of devices? What's going
on? 

The change itself seems harmless. It's not often that we'd be in a macro
when the cdr init func is run!

murf


> Steve
-- 
Steve Murphy
Software Developer
Digium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3227 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070613/da9b98d4/smime.bin


More information about the asterisk-dev mailing list