From 2bc07d285ebddf3e92378f86e972a535c99efab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 15 Apr 2015 18:05:37 +0200 Subject: [PATCH] BRoster::Private::SendTo() cannot be used in registrar. * We're checking with IsTargetLocal() if we're allowed to access it or not. * This might introduce regressions, if the registrar is using its own services via the BRoster API. * This fixes a deadlock when the system clipboard tries to get initialized within the registrar. --- src/kits/app/RosterPrivate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/app/RosterPrivate.cpp b/src/kits/app/RosterPrivate.cpp index 261b84c8ca..520e8ab4de 100644 --- a/src/kits/app/RosterPrivate.cpp +++ b/src/kits/app/RosterPrivate.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2009, Haiku. + * Copyright 2001-2015, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -67,6 +67,8 @@ BRoster::Private::SendTo(BMessage *message, BMessage *reply, bool mime) const BMessenger& messenger = mime ? fRoster->_MimeMessenger() : fRoster->fMessenger; + if (messenger.IsTargetLocal()) + return B_BAD_VALUE; return reply != NULL ? messenger.SendMessage(message, reply)