Added spinlock ses_lock to struct SESSION to ensure that for each session closeSession is called only once.

closeSession is called from mysql_backend.c:gw_read_backend_event, and from dcb.c:dcb_close.

This is part of Bug #163.
This commit is contained in:
vraatikka
2013-08-22 10:42:18 +03:00
parent 4138281183
commit 0401290021
4 changed files with 56 additions and 15 deletions

View File

@ -59,6 +59,7 @@ SESSION *session;
if ((session = (SESSION *)malloc(sizeof(SESSION))) == NULL)
return NULL;
spinlock_init(&session->ses_lock);
session->service = service;
session->client = client;
memset(&session->stats, 0, sizeof(SESSION_STATS));