[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:       Michiel van Baak <michiel () vanbaak ! info>
Date:       2008-01-10 11:43:33
Message-ID: 20080110114333.GD8379 () vanbaak ! info
[Download RAW message or body]

On 11:18, Thu 10 Jan 08, Nick Gorham wrote:
> Hi,
> 
> The change to use prepare_cb() in odbc_log became broken in r88182.
> 
> The code calls SQLBindParameter on a local variable (timestr) but as it 
> now doesn't call SQLExecute in the same function when it finally gets to 
> SQLExecute that variable is out of scope.
> 
> I dont know if I can pass attachments to this list, so the fixed cdr can 
> be found here http://www.lurcher.org/~nick/cdr_odbc.c
> 
> The code contained the following lines
> 
>         /* We really should only have to do this once.  But for some
>          * strange reason if I don't it blows holes in memory like
>          * like a shotgun.  So we just do this so its safe.
>          */
> 
> The "strange reason", as I have tried to report several times now via 
> the forum, is that the memory passed to SQLBindParameter is not 
> referenced until the SQLExecute, that the point of binding parameters, 
> you pass the address of the storage, then before the SQLExecute you set 
> the values you intend to use.

Hi,

Can you post this to http://bugs.digium.com with a unified
diff as the patch ?
Thank you.

-- 

Michiel van Baak
michiel@vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer afficionados are both called users?"


_______________________________________________
--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