pg_con.c File Reference

DB_POSTGRES :: Core

Module: DB_POSTGRES :: the PostgreSQL driver for Kamailio. More...

#include "pg_con.h"
#include "../../mem/mem.h"
#include "../../dprint.h"
#include "../../ut.h"
#include <string.h>
#include <time.h>

Include dependency graph for pg_con.c:

Go to the source code of this file.

Functions

void db_postgres_free_connection (struct pool_con *con)
 Close the connection and release memory.
struct pg_condb_postgres_new_connection (struct db_id *id)
 Create a new connection.


Detailed Description

DB_POSTGRES :: Core

Module: DB_POSTGRES :: the PostgreSQL driver for Kamailio.

Definition in file pg_con.c.


Function Documentation

void db_postgres_free_connection ( struct pool_con con  ) 

Close the connection and release memory.

Parameters:
con connection

Definition at line 108 of file pg_con.c.

References pg_con::con, free_db_id(), pg_con::id, LM_DBG, pkg_free, and pg_con::res.

Referenced by db_postgres_close().

struct pg_con* db_postgres_new_connection ( struct db_id id  )  [read]

Create a new connection.

Create a new connection structure in private memory, open the PostgreSQL connection and set reference count to 1

Parameters:
id database id
Returns:
postgres connection structure, 0 on error

Definition at line 46 of file pg_con.c.

References pg_con::con, pg_con::connected, db_id::database, db_id::host, pg_con::id, int2str(), LM_DBG, LM_ERR, NULL, db_id::password, pkg_free, pkg_malloc, db_id::port, pg_con::ref, pg_con::timestamp, db_id::username, and ZSW.

Referenced by db_postgres_init().


Generated on Thu May 24 02:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6