* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32519 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-08-19 14:05:00 +00:00
parent 53b322deb2
commit 30d716e081
1 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2009, Haiku, Inc.
* Copyright 2001-2009, Haiku, Inc.
* Distributed under the terms of the MIT license.
*
* Authors:
@ -23,6 +23,7 @@
#include <syslog.h>
//#define DEBUG_SERVER
#ifdef DEBUG_SERVER
# include <stdio.h>
@ -168,13 +169,13 @@ void
AppServer::RunLooper()
{
rename_thread(find_thread(NULL), "picasso");
_message_thread((void *)this);
_message_thread((void*)this);
}
/*! \brief Creates a desktop object for an authorized user
*/
Desktop *
Desktop*
AppServer::_CreateDesktop(uid_t userID)
{
BAutolock locker(fDesktopLock);
@ -190,8 +191,9 @@ AppServer::_CreateDesktop(uid_t userID)
if (status == B_OK && !fDesktops.AddItem(desktop))
status = B_NO_MEMORY;
if (status < B_OK) {
fprintf(stderr, "Cannot initialize Desktop object: %s\n", strerror(status));
if (status != B_OK) {
syslog(LOG_ERR, "Cannot initialize Desktop object: %s\n",
strerror(status));
delete desktop;
return NULL;
}
@ -243,8 +245,9 @@ AppServer::_DispatchMessage(int32 code, BPrivate::LinkReceiver& msg)
Desktop* desktop = _FindDesktop(userID);
if (desktop == NULL) {
// we need to create a new desktop object for this user
// ToDo: test if the user exists on the system
// ToDo: maybe have a separate AS_START_DESKTOP_SESSION for authorizing the user
// TODO: test if the user exists on the system
// TODO: maybe have a separate AS_START_DESKTOP_SESSION for
// authorizing the user
desktop = _CreateDesktop(userID);
}