Re: [qdbm-users] dpopen
Brought to you by:
mikio
|
From: George N. <ge...@ne...> - 2008-10-05 18:34:35
|
Mikio, On Sun, Oct 5, 2008 at 4:16 AM, Mikio Hirabayashi <mi...@us...> wrote: > Hi, > >> It seems to me these checks should -not- be qualified with !(omode & >> DP_ONOLCK) >> >> Is this a bug or intended? > > It is intended behaviour. > When DP_ONOLCK is specified, validation to the database format is not > assured. So, check is omitted. Sometimes an invalid depot file will be passed to dpopen(); and it doesn't fail. I will "mode & ~DP_ONOLCK" in my wrapper function to force the header check for now. Is it possible to have the dpopen() documentation mention DP_ONOLCK turns off depot header and file size checks, it currently only mentions that it opens a database without locking. TIA, George. |