BHandler: hopefully fixes a regression introduced in hrev43777.
* BHandler scripting handles bad scripting syntax by returning the Messenger property. * Thanks to Siarzhuk Zharski for pointing this out.
This commit is contained in:
@@ -222,11 +222,14 @@ BHandler::MessageReceived(BMessage *message)
|
|||||||
int32 form;
|
int32 form;
|
||||||
const char *prop;
|
const char *prop;
|
||||||
|
|
||||||
status_t err = message->GetCurrentSpecifier(&cur, &specifier, &form, &prop);
|
status_t err = message->GetCurrentSpecifier(&cur, &specifier,
|
||||||
if (err != B_OK)
|
&form, &prop);
|
||||||
|
if (err != B_OK && err != B_BAD_SCRIPT_SYNTAX)
|
||||||
break;
|
break;
|
||||||
bool known = false;
|
bool known = false;
|
||||||
if (cur < 0 || (strcmp(prop, "Messenger") == 0)) {
|
// B_BAD_SCRIPT_SYNTAX defaults to the Messenger property
|
||||||
|
if (err == B_BAD_SCRIPT_SYNTAX || cur < 0
|
||||||
|
|| (strcmp(prop, "Messenger") == 0)) {
|
||||||
err = reply.AddMessenger("result", this);
|
err = reply.AddMessenger("result", this);
|
||||||
known = true;
|
known = true;
|
||||||
} else if (strcmp(prop, "Suites") == 0) {
|
} else if (strcmp(prop, "Suites") == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user