rtp: use the right type when checking cmsg_type

Use SCM_* instead of SO_* when checking the type of each cmsghdr.

See bug #42715
This commit is contained in:
Pino Toscano 2011-11-14 11:44:43 +01:00 committed by Arun Raghavan
parent 6aa84d6db0
commit 992333697f

View file

@ -278,14 +278,14 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
}
for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP) {
if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_TIMESTAMP) {
memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval));
found_tstamp = TRUE;
break;
}
if (!found_tstamp) {
pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!");
pa_log_warn("Couldn't find SCM_TIMESTAMP data in auxiliary recvmsg() data!");
memset(tstamp, 0, sizeof(tstamp));
}