* destroyed client side */
*object = NULL;
} else if (*object == NULL && *p != 0) {
- printf("unknown object (%d), message %s(%s)\n",
+ printf("unknown object (%u), message %s(%s)\n",
*p, message->name, message->signature);
*object = NULL;
errno = EINVAL;
if (*object != NULL && message->types[i-2] != NULL &&
(*object)->interface != message->types[i-2]) {
- printf("invalid object (%d), type (%s), "
+ printf("invalid object (%u), type (%s), "
"message %s(%s)\n",
*p, (*object)->interface->name,
message->name, message->signature);
abort();
}
+ if (wl_debug)
+ wl_closure_print(closure, &proxy->object, true);
+
if (wl_closure_send(closure, proxy->display->connection)) {
fprintf(stderr, "Error sending request: %m\n");
abort();
}
- if (wl_debug)
- wl_closure_print(closure, &proxy->object, true);
-
wl_closure_destroy(closure);
}
struct wl_display *display, struct wl_object *object,
uint32_t code, const char *message)
{
- fprintf(stderr, "%s@%d: error %d: %s\n",
+ fprintf(stderr, "%s@%u: error %d: %s\n",
object->interface->name, object->id, code, message);
abort();
}
closure = wl_connection_demarshal(display->connection, size,
&display->objects, message);
+ if (wl_debug)
+ wl_closure_print(closure, &proxy->object, false);
+
if (closure == NULL || create_proxies(display, closure) < 0) {
fprintf(stderr, "Error demarshalling event\n");
abort();
}
- if (wl_debug)
- wl_closure_print(closure, &proxy->object, false);
-
wl_closure_invoke(closure, &proxy->object,
proxy->object.implementation[opcode],
proxy->user_data);
if (resource == NULL) {
wl_resource_post_error(client->display_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "invalid object %d", p[0]);
+ "invalid object %u", p[0]);
break;
}
if (opcode >= object->interface->method_count) {
wl_resource_post_error(client->display_resource,
WL_DISPLAY_ERROR_INVALID_METHOD,
- "invalid method %d, object %s@%d",
+ "invalid method %d, object %s@%u",
opcode,
object->interface->name,
object->id);
&client->objects, message);
len -= size;
+ if (wl_debug)
+ wl_closure_print(closure, object, false);
+
if (closure == NULL && errno == EINVAL) {
wl_resource_post_error(client->display_resource,
WL_DISPLAY_ERROR_INVALID_METHOD,
- "invalid arguments for %s@%d.%s",
+ "invalid arguments for %s@%u.%s",
object->interface->name,
object->id,
message->name);
deref_new_objects(closure);
- if (wl_debug)
- wl_closure_print(closure, object, false);
-
wl_closure_invoke(closure, object,
object->implementation[opcode], client);
marshal(&data, "n", 12, &object);
assert(data.buffer[2] == object.id);
- marshal(&data, "n", 12, NULL);
+ marshal(&data, "?n", 12, NULL);
assert(data.buffer[2] == 0);
array.data = (void *) text;