protocol: use Fd pod for fd indexes for easier debugging

This commit is contained in:
Wim Taymans 2019-08-16 15:11:04 +02:00
parent 8da7222c7e
commit 2f28e59c63
3 changed files with 12 additions and 14 deletions

View file

@ -196,7 +196,7 @@ static int refill_buffer(struct pw_protocol_native_connection *conn, struct buff
/* ERRORS */
recv_error:
pw_log_error("could not recvmsg on fd %d: %s", conn->fd, strerror(errno));
pw_log_error("could not recvmsg on fd:%d: %s", conn->fd, strerror(errno));
return -errno;
}
@ -517,7 +517,7 @@ int pw_protocol_native_connection_flush(struct pw_protocol_native_connection *co
/* ERRORS */
send_error:
res = -errno;
pw_log_error("could not sendmsg: %s", strerror(errno));
pw_log_error("could not sendmsg on fd:%d n_fds:%d: %s", conn->fd, n_fds, strerror(errno));
return res;
}

View file

@ -346,7 +346,7 @@ static int core_event_demarshal_add_mem(void *object, const struct pw_protocol_n
if (spa_pod_parser_get_struct(&prs,
SPA_POD_Int(&id),
SPA_POD_Id(&type),
SPA_POD_Int(&idx),
SPA_POD_Fd(&idx),
SPA_POD_Int(&flags)) < 0)
return -EINVAL;
@ -462,7 +462,7 @@ static void core_event_marshal_add_mem(void *object, uint32_t id, uint32_t type,
spa_pod_builder_add_struct(b,
SPA_POD_Int(id),
SPA_POD_Id(type),
SPA_POD_Int(pw_protocol_native_add_resource_fd(resource, fd)),
SPA_POD_Fd(pw_protocol_native_add_resource_fd(resource, fd)),
SPA_POD_Int(flags));
pw_protocol_native_end_resource(resource, b);