Added session refcount in session.h

The refcount is incremented in dcb_connect and in mysql_client.c after session_alloc
This commit is contained in:
Massimiliano Pinto
2013-09-02 10:26:34 +02:00
parent b86d3f3dfd
commit 31cda5ad65
4 changed files with 23 additions and 5 deletions

View File

@ -29,7 +29,9 @@
* 14-06-2013 Massimiliano Pinto Added void *data to session
* for session specific data
* 01-07-2013 Massimiliano Pinto Removed backends pointer
from struct session
* from struct session
* 02-09-2013 Massimiliano Pinto Added session ref counter
*
* @endverbatim
*/
#include <time.h>
@ -81,6 +83,7 @@ typedef struct session {
struct service *service; /**< The service this session is using */
struct session *next; /**< Linked list of all sessions */
skygw_chk_t ses_chk_tail;
int refcount; /**< Reference count on the session */
} SESSION;
#define SESSION_PROTOCOL(x, type) DCB_PROTOCOL((x)->client, type)