* 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

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