Fixed InitData(): It must not be possible to construct a messenger targeting a B_ARGV_ONLY app.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-08-05 00:48:58 +00:00
parent c26a5cea91
commit c9f4f5e164

View File

@ -601,6 +601,9 @@ BMessenger::InitData(const char *signature, team_id team, status_t *result)
// check, whether the signature is correct
if (error == B_OK && signature && strcmp(signature, info.signature) != 0)
error = B_BAD_VALUE;
// check whether it the app flags say B_ARGV_ONLY
if (error == B_OK && (info.flags & B_ARGV_ONLY))
error = B_BAD_TYPE;
// init our members
if (error == B_OK) {
fTeam = team;