Beispiel #1
0
int
wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)
{
	int size;
	uint32_t buffer_size;
	uint32_t *buffer;
	int result;

	if (copy_fds_to_connection(closure, connection))
		return -1;

	buffer_size = buffer_size_for_closure(closure);
	buffer = malloc(buffer_size * sizeof buffer[0]);
	if (buffer == NULL)
		return -1;

	size = serialize_closure(closure, buffer, buffer_size);
	if (size < 0) {
		free(buffer);
		return -1;
	}

	result = wl_connection_queue(connection, buffer, size);
	free(buffer);

	return result;
}
Beispiel #2
0
int
wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)
{
	uint32_t size;

	if (copy_fds_to_connection(closure, connection))
		return -1;

	size = closure->start[1] >> 16;

	return wl_connection_queue(connection, closure->start, size);
}
Beispiel #3
0
int
wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)
{
	uint32_t buffer[256];
	int size;

	if (copy_fds_to_connection(closure, connection))
		return -1;

	size = serialize_closure(closure, buffer, 256);
	if (size < 0)
		return -1;

	return wl_connection_queue(connection, buffer, size);
}