Return B_NO_MEMORY, if the command handler could *not* be allocated. First tests indicate that the messaging service basically seems to be working. Didn't test yet, if that's still true, when an area is full.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11161 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-01-30 18:48:38 +00:00
parent d06fe82117
commit ea9716dc6e
1 changed files with 3 additions and 1 deletions

View File

@ -262,7 +262,7 @@ MessagingService::Init()
// install the default send message command handler // install the default send message command handler
MessagingCommandHandler *handler = new(nothrow) DefaultSendCommandHandler; MessagingCommandHandler *handler = new(nothrow) DefaultSendCommandHandler;
if (handler) if (!handler)
return B_NO_MEMORY; return B_NO_MEMORY;
SetCommandHandler(MESSAGING_COMMAND_SEND_MESSAGE, handler); SetCommandHandler(MESSAGING_COMMAND_SEND_MESSAGE, handler);
@ -369,6 +369,8 @@ MessagingService::_CommandProcessor()
"commands.", area, area->ID(), area->CountCommands())); "commands.", area, area->ID(), area->CountCommands()));
break; break;
} }
PRINT(("MessagingService::_CommandProcessor(): got command %lu\n",
command->command));
// dispatch the command // dispatch the command
MessagingCommandHandler *handler MessagingCommandHandler *handler