Re On Tue, Oct 25, 2011 at 10:01 PM, Norbert Sendetzky <norb...@linuxnetworks.de> wrote: > Hi Alex > >> I'm evaluating OpenDBX for use in one of my projects, and found several >> errors: >> - sqlite3 backend doesn't check that host parameter ends with /, and >> simply appends database name to path, creating incorrect file name. I >> attached simple patch to fix this - it checks, that path ends with /, >> and if not, then adds it. The only improvement that should be made >> there - add preprocessor condition to select / or \ depending on >> platform used (unix or windows) > > Yes, the sqlite3 backend doesn't care about slashes/backslashes at the > end of the path, so it don't have to care about Unix/Windows differences > (also noted here: > http://linuxnetworks.de/doc/index.php/OpenDBX/Configuration#sqlite3_backend)
This could be noted, but simple patch can fix this, making better experience >> - second problem is more serious - it crash, when following >> combination of commands was used: >> 1. create connection >> 2. bind >> 3. do select >> 4. retrieve results >> 5. call result.finish(); >> 6. call connection.finish(); >> >> the problem is that if I call finish(), then unbind isn't called, >> while finish will free database handle, that will be used in Conn >> destructor, to perform unbind. I'm not sure how it's better to fix >> this - one potential solution, is to use odbx_t** as parameter to >> odbx_finish, so it will set handle to NULL, after it will freed. > > If you don't let the destructor do the work, you have to care about the > correct sequence yourself (new Conn(), bind(), ..., unbind(), finish()). > It's the same as in the procedural interface. Maybe we can improve the > situation if we call Conn.unbind() in Conn.finish() if it's not done before. I allow destructor to care, but it should depend on which functions was called already & which not... P.S. I already switched from OpenDBX, as using it I got mysterious crashes due memory corruption... -- With best wishes, Alex Ott http://alexott.net/ Tiwtter: alexott_en (English), alexott (Russian) Skype: alex.ott ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ libopendbx-devel mailing list libopendbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libopendbx-devel http://www.linuxnetworks.de/doc/index.php/OpenDBX