[asterisk-dev] cdr_odbc.c is broken in trunk
Michiel van Baak
michiel at vanbaak.info
Thu Jan 10 08:48:01 CST 2008
On 14:06, Thu 10 Jan 08, Nick Gorham wrote:
> Michiel van Baak wrote:
> >On 11:18, Thu 10 Jan 08, Nick Gorham wrote:
> >>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.
> >Can you post this to http://bugs.digium.com with a unified
> >diff as the patch ?
> >Thank you.
> Err, no as it happens, I don't see why I should provide anyone my
> address and phone number to submit a bug fix to what I believed was a
> GPL project!!!
Go read: http://asterisk.org/developers/bug-guidelines and
then specifically "The contributor license agreement"
That's why you have to sign the disclaimer.
Michiel van Baak
michiel at 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?"
More information about the asterisk-dev