Fix calls to sendmsg()

Align cmsg buffers properly and use MSG_NOSIGNAL.
This commit is contained in:
Demi Marie Obenour 2022-07-30 16:48:27 -04:00 committed by Wim Taymans
parent 90c955c223
commit c1920163d5
3 changed files with 12 additions and 6 deletions

View file

@ -877,7 +877,7 @@ static int flush_write(struct state *state, uint64_t current_time)
SPA_AVBTP_PACKET_AAF_SET_SEQ_NUM(pdu, state->pdu_seq++);
SPA_AVBTP_PACKET_AAF_SET_TIMESTAMP(pdu, ptime);
n = sendmsg(state->sockfd, &state->msg, 0);
n = sendmsg(state->sockfd, &state->msg, MSG_NOSIGNAL);
if (n < 0 || n != (ssize_t)state->pdu_size) {
spa_log_error(state->log, "sendmdg() failed: %m");
}