my_con.h File Reference

DB_MYSQL :: Core my_con.c

Module: DB_MYSQL :: the MySQL driver for Kamailio. More...

#include "../../db/db_pool.h"
#include "../../db/db_id.h"
#include <time.h>
#include <mysql/mysql.h>

Include dependency graph for my_con.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  my_con

Defines

#define CON_CONNECTION(db_con)   (((struct my_con*)((db_con)->tail))->con)
#define CON_RESULT(db_con)   (((struct my_con*)((db_con)->tail))->res)
#define CON_ROW(db_con)   (((struct my_con*)((db_con)->tail))->row)
#define CON_TIMESTAMP(db_con)   (((struct my_con*)((db_con)->tail))->timestamp)

Functions

void db_mysql_free_connection (struct pool_con *con)
 Close the connection and release memory.
struct my_condb_mysql_new_connection (const struct db_id *id)
 Create a new connection structure, open the MySQL connection and set reference count to 1.


Detailed Description

DB_MYSQL :: Core my_con.c

Module: DB_MYSQL :: the MySQL driver for Kamailio.

Definition in file my_con.h.


Define Documentation

#define CON_CONNECTION ( db_con   )     (((struct my_con*)((db_con)->tail))->con)

#define CON_RESULT ( db_con   )     (((struct my_con*)((db_con)->tail))->res)

#define CON_ROW ( db_con   )     (((struct my_con*)((db_con)->tail))->row)

#define CON_TIMESTAMP ( db_con   )     (((struct my_con*)((db_con)->tail))->timestamp)

Definition at line 60 of file my_con.h.

Referenced by db_mysql_submit_query().


Function Documentation

void db_mysql_free_connection ( struct pool_con con  ) 

Close the connection and release memory.

Definition at line 137 of file my_con.c.

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

Referenced by db_mysql_close().

struct my_con* db_mysql_new_connection ( const struct db_id id  )  [read]

Create a new connection structure, open the MySQL connection and set reference count to 1.

Definition at line 43 of file my_con.c.

References my_con::con, db_id::database, db_mysql_auto_reconnect, db_mysql_timeout_interval, db_id::host, my_con::id, LM_DBG, LM_ERR, NULL, db_id::password, pkg_free, pkg_malloc, db_id::port, my_con::ref, my_con::timestamp, db_id::username, and ZSW.

Referenced by db_mysql_init().


Generated on Wed May 23 20:00:41 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6