Revision: 40805
http://brlcad.svn.sourceforge.net/brlcad/?rev=40805&view=rev
Author: davidloman
Date: 2010-09-29 13:12:21 +0000 (Wed, 29 Sep 2010)
Log Message:
-----------
More work on SessionManager NetMsg handling.
Modified Paths:
--------------
rt^3/trunk/src/GS/SessionManager.cxx
Modified: rt^3/trunk/src/GS/SessionManager.cxx
===================================================================
--- rt^3/trunk/src/GS/SessionManager.cxx 2010-09-29 13:11:21 UTC (rev
40804)
+++ rt^3/trunk/src/GS/SessionManager.cxx 2010-09-29 13:12:21 UTC (rev
40805)
@@ -27,6 +27,7 @@
#include "AccountManager.h"
#include "NetMsgTypes.h"
#include "libutility.h"
+#include "GenericOneByteMsg.h"
#include <QtCore/QMutexLocker>
@@ -35,6 +36,7 @@
SessionManager::SessionManager()
{
this->sessionIdMap = new QMap<quint32, Session*> ();
+ this->log = Logger::getInstance();
}
SessionManager::~SessionManager()
@@ -81,7 +83,26 @@
*/
void SessionManager::handleNewSessionReqMsg(NewSessionReqMsg* msg)
{
+ Portal* origin = msg->getOrigin();
+ QString uname = msg->getUName();
+ QString passwd = msg->getPasswd();
+
+ if (origin == 0) {
+ //How to handle??
+
+ return;
+ }
+
+
Account* a = AccountManager::getInstance()->login(msg->getUName(),
msg->getPasswd(), msg->getOrigin());
+
+ if (a == 0) {
+ //Account validation failed
+ GenericOneByteMsg* fail = new GenericOneByteMsg(FAILURE,
ACCOUNT_VALIDATION_FAIL);
+
+
+ }
+
Session* s = this->newSession(a);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits