for (idx = 0 ; idx < COOKIECOUNT ; idx++) {
while ((cookie = session->cookies[idx])) {
session->cookies[idx] = cookie->next;
for (idx = 0 ; idx < COOKIECOUNT ; idx++) {
while ((cookie = session->cookies[idx])) {
session->cookies[idx] = cookie->next;
/* increase the use count on 'session' (can be NULL) */
struct afb_session *afb_session_addref(struct afb_session *session)
{
/* increase the use count on 'session' (can be NULL) */
struct afb_session *afb_session_addref(struct afb_session *session)
{
- if (session != NULL)
- __atomic_add_fetch(&session->refcount, 1, __ATOMIC_RELAXED);
+ if (session != NULL) {
+ afb_hook_session_unref(session);
+ afb_hook_session_addref(session);
+ session->refcount++;
+ session_unlock(session);
+ }
/* generate a new token and update client context */
void afb_session_new_token (struct afb_session *session)
{
/* generate a new token and update client context */
void afb_session_new_token (struct afb_session *session)
{