From d6a0cfc398c91fd20fae805767e11970e168200a Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 9 Aug 2012 11:15:26 +0200 Subject: [PATCH 1/2] Create group2sessions.sessionIDs if it doesn't exist yet. --- src/node/db/SessionManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/db/SessionManager.js b/src/node/db/SessionManager.js index ec4948a6..18c271a2 100644 --- a/src/node/db/SessionManager.js +++ b/src/node/db/SessionManager.js @@ -139,7 +139,7 @@ exports.createSession = function(groupID, authorID, validUntil, callback) if(ERR(err, callback)) return; //the entry doesn't exist so far, let's create it - if(group2sessions == null) + if(group2sessions == null || group2sessions.sessionIDs == null) { group2sessions = {sessionIDs : {}}; } From d9d28369b2b456c6bb6208ce2ada8661c164af93 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 10 Aug 2012 16:20:07 +0200 Subject: [PATCH 2/2] Create author2sessions.sessionIDs if it doesn't exist yet. --- src/node/db/SessionManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/db/SessionManager.js b/src/node/db/SessionManager.js index 18c271a2..5ce4f748 100644 --- a/src/node/db/SessionManager.js +++ b/src/node/db/SessionManager.js @@ -162,7 +162,7 @@ exports.createSession = function(groupID, authorID, validUntil, callback) if(ERR(err, callback)) return; //the entry doesn't exist so far, let's create it - if(author2sessions == null) + if(author2sessions == null || author2sessions.sessionIDs == null) { author2sessions = {sessionIDs : {}}; }