now handles also the case when all specifiers are solved, and behaves as if we were asked the Messenger
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17837 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c4dde2f738
commit
a58450492a
@ -184,26 +184,24 @@ BHandler::MessageReceived(BMessage *message)
|
||||
const char *prop;
|
||||
|
||||
status_t err = message->GetCurrentSpecifier(&cur, &specifier, &form, &prop);
|
||||
if (err == B_OK) {
|
||||
bool known = false;
|
||||
if (strcmp(prop, "Suites") == 0) {
|
||||
err = GetSupportedSuites(&reply);
|
||||
known = true;
|
||||
} else if (strcmp(prop, "Messenger") == 0) {
|
||||
err = reply.AddMessenger("result", this);
|
||||
known = true;
|
||||
} else if (strcmp(prop, "InternalName") == 0) {
|
||||
err = reply.AddString("result", Name());
|
||||
known = true;
|
||||
}
|
||||
|
||||
if (known) {
|
||||
reply.AddInt32("error", B_OK);
|
||||
message->SendReply(&reply);
|
||||
return;
|
||||
}
|
||||
// let's try next handler
|
||||
bool known = false;
|
||||
if (index < 0 || (strcmp(prop, "Messenger") == 0)) {
|
||||
err = reply.AddMessenger("result", this);
|
||||
known = true;
|
||||
} else if (strcmp(prop, "Suites") == 0) {
|
||||
err = GetSupportedSuites(&reply);
|
||||
known = true;
|
||||
} else if (strcmp(prop, "InternalName") == 0) {
|
||||
err = reply.AddString("result", Name());
|
||||
known = true;
|
||||
}
|
||||
|
||||
if (known) {
|
||||
reply.AddInt32("error", B_OK);
|
||||
message->SendReply(&reply);
|
||||
return;
|
||||
}
|
||||
// let's try next handler
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user