[Kamailio-Devel] SF.net SVN: openser:[5359] trunk

Henning Westerholt henning.westerholt at 1und1.de
Mon Dec 15 16:07:12 CET 2008


Revision: 5359
          http://openser.svn.sourceforge.net/openser/?rev=5359&view=rev
Author:   henningw
Date:     2008-12-15 15:07:12 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
- change behaviour of db_str2val, this now copy strings
- this change was necessary because in some circumstances the memory that is
  returned from the database driver is used by some other means too fast,
  causes crashed or wrong results later on, this bug is timing related
- this means for mysql and unixodbc that the performance will be decreased a
  bit, postgres already copied the string, so here nothing change
- add a new function to DB core API, db_val2str that, usable to convert
  numerical values to a string, and common things like NULL values conversion,
  parameter checks
- convert mysql, postgres and unixodbc module to use this new function
- convert postgres function to use the core db_str2val function, the copying
  is now done at a different place, cleanup the code somewhat
- remove unnecessary assignment if a NULL value is encountered in postgres
- TODO: fix NULL handling and double copying that is done now for unixodbc

Modified Paths:
--------------
    trunk/db/db_val.c
    trunk/db/db_val.h
    trunk/modules/db_mysql/val.c
    trunk/modules/db_postgres/res.c
    trunk/modules/db_postgres/val.c
    trunk/modules/db_unixodbc/val.c


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Devel mailing list