Remove unused communication port, pointed out by Axel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38216 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2010-08-17 23:23:02 +00:00
parent 26d8064ea8
commit ee9246d5f5
3 changed files with 4 additions and 28 deletions
-2
View File
@@ -14,8 +14,6 @@ public:
BWindowStack(BWindow* window);
~BWindowStack();
status_t InitCheck();
status_t AddWindow(const BWindow* window);
status_t AddWindow(const BMessenger& window);
status_t AddWindowAt(const BWindow* window,
+1 -19
View File
@@ -25,31 +25,14 @@ using namespace BPrivate;
BWindowStack::BWindowStack(BWindow* window)
:
fLink(NULL)
{
port_id receivePort = create_port(B_LOOPER_PORT_DEFAULT_CAPACITY,
"w_stack<app_server");
if (receivePort >= 0)
fLink = new(std::nothrow) BPrivate::PortLink(
window->fLink->SenderPort(), receivePort);
fLink = window->fLink;
}
BWindowStack::~BWindowStack()
{
if (fLink)
delete_port(fLink->ReceiverPort());
delete fLink;
}
status_t
BWindowStack::InitCheck()
{
if (fLink == NULL)
return B_NO_MEMORY;
return B_OK;
}
@@ -221,7 +204,6 @@ status_t
BWindowStack::_StartMessage(int32 what)
{
fLink->StartMessage(AS_TALK_TO_DESKTOP_LISTENER);
fLink->Attach<port_id>(fLink->ReceiverPort());
fLink->Attach<int32>(kMagicSATIdentifier);
return fLink->Attach<int32>(what);
}
+3 -7
View File
@@ -1158,16 +1158,12 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
case AS_TALK_TO_DESKTOP_LISTENER:
{
port_id senderPort;
link.Read<port_id>(&senderPort);
BPrivate::LinkSender sender(senderPort);
BPrivate::PortLinkRef listenerLink(&sender, &link);
if (fDesktop->MessageForListener(fWindow, listenerLink))
if (fDesktop->MessageForListener(fWindow, fLink))
break;
// unhandled message at least send an error if needed
if (link.NeedsReply()) {
sender.StartMessage(B_ERROR);
sender.Flush();
fLink.StartMessage(B_ERROR);
fLink.Flush();
}
break;
}