meso: Implement ConnectLight
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <mesosphere/processes/KLightSession.hpp>
|
||||
#include <mesosphere/processes/KPort.hpp>
|
||||
#include <mesosphere/core/KCoreContext.hpp>
|
||||
|
||||
namespace mesosphere
|
||||
@@ -8,14 +9,24 @@ KLightSession::~KLightSession()
|
||||
{
|
||||
}
|
||||
|
||||
Result KLightSession::Initialize()
|
||||
Result KLightSession::Initialize(KPort *parentPort)
|
||||
{
|
||||
SetClientServerParent();
|
||||
isClientAlive = true;
|
||||
isServerAlive = true;
|
||||
|
||||
SetResourceOwner(KCoreContext::GetCurrentInstance().GetCurrentProcess());
|
||||
return ResultSuccess();
|
||||
|
||||
if (parentPort == nullptr) {
|
||||
return ResultSuccess();
|
||||
} else {
|
||||
// Another difference with official kernel: if adding the session fails, the session isn't added to allocator set (since it'll be deleted right away).
|
||||
Result res = parentPort->AddLightServerSession(server);
|
||||
if (res.IsSuccess()) {
|
||||
client.parentClientPort = &parentPort->GetClient();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
void KLightSession::Terminate(bool fromServer)
|
||||
|
||||
Reference in New Issue
Block a user