[Devel] SF.net SVN: opensips:[4535] trunk/modules/db_postgres/dbase.c

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sat Aug 2 17:02:21 CEST 2008


Revision: 4535
          http://opensips.svn.sourceforge.net/opensips/?rev=4535&view=rev
Author:   bogdan_iancu
Date:     2008-08-02 15:02:20 +0000 (Sat, 02 Aug 2008)

Log Message:
-----------
- fix PGRES_FATAL_ERROR bug in postgres driver
- the result set was cleared in this case, but no error was> returned
- reported from Andrew O. Zhukov, gnugk at telegroup dot com dot ua

- further bug fixes for db_postgres_fetch_result and db_postgres_store_result
- return also for all other abnormal query states an error, as the result set
  is here set to zero too
- this is probably a little bit to strict, but in the openser context this
  types normally should not happen
- as the old behaviour could lead to crashes if this gets eventually reported
  from the driver, this is surely an improvement  :-)  
  (most query user check only for return value < 0, and not for == 0)
- in case for the PGRES_EMPTY_QUERY this could be not recognized as error
  from upper layers at all, as this is defined as zero in the pg driver..

- change log level for 'probably invalid queries' from WARN to ERR
- as we stop execution and return a failure anyway, we should also
  inform the user with the correct log level about this
- move error message to default case

Credits go to Henning Westerholt.

Modified Paths:
--------------
    trunk/modules/db_postgres/dbase.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