[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] cdr_odbc.c is broken in trunk
From:       Nick Gorham <nick () lurcher ! org>
Date:       2008-01-10 16:48:07
Message-ID: 47864C47.9070203 () lurcher ! org
[Download RAW message or body]

Tilghman Lesher wrote:

>Uh, no, the stack doesn't work that way.  The entire contents of timestr[]
>remain valid and unchanged until the stack frame is popped.  Which will not
>happen until odbc_log() exits.  The only reason this location would be
>overwritten is if there's a stack overflow error (not impossible, but we've
>been fairly diligent in finding those issues).
>
>  
>
Can I respectfully suggest you take a look at the current trunk code, 
what you describe was true, but its not now. timestr is declared in 
prepare_cb() wich is called from odbc_log, so once the  process is back 
in odbc_log the memory that was used and passed to the driver is now out 
of scope.

>>Fair enough, I guess I should keep going to see how negative I can get
>>my karma to be while still trying to be helpfull.
>>    
>>
>
>The karma system is there to remind us how unhelpful people can be while
>they're "trying to be helpfull".
>
>  
>
Oh good, I am happy for you. I always thought the purpose of such a 
system was to encourage the users to behave in a positive and helpful 
way, my mistake.

-- 
Nick

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic