*ret_type = MRP_FUNCBRIDGE_BOOLEAN;
ret_val->boolean = true;
- return true;
+ return TRUE;
}
double d_val;
int ret = -1;
+ char *error = "unknown error";
MRP_UNUSED(L);
if (!signature || signature[0] != 'o') {
- return false;
+ mrp_log_error("amb: invalid signature '%s'", signature ? signature : "NULL");
+ goto error;
}
sink = (mrp_lua_sink_t *) args[0].pointer;
property = mrp_lua_sink_get_property(sink);
if (!property || strlen(property) == 0) {
+ error = "invalid property";
goto error;
}
type = mrp_lua_sink_get_type(sink);
if (!type || strlen(type) != 1) {
+ error = "invalid type";
goto error;
}
break;
}
+ if (ret < 0) {
+ error = "error updating property";
+ goto error;
+ }
+
*ret_type = MRP_FUNCBRIDGE_BOOLEAN;
ret_val->boolean = true;
- return ret == 0;
+ return TRUE;
error:
mrp_log_error("AMB: error processing the property change!");
*ret_type = MRP_FUNCBRIDGE_BOOLEAN;
ret_val->boolean = false;
- return true;
+ /* FIXME: this shouldn't be needed, but without this the element handler crashes */
+ ret_val->string = mrp_strdup(error);
+
+ return TRUE;
}