]> code.delx.au - pulseaudio/commitdiff
rtp: use the right type when checking cmsg_type
authorPino Toscano <toscano.pino@tiscali.it>
Mon, 14 Nov 2011 10:44:43 +0000 (11:44 +0100)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 2 Jan 2012 18:50:04 +0000 (00:20 +0530)
Use SCM_* instead of SO_* when checking the type of each cmsghdr.

See bug #42715

src/modules/rtp/rtp.c

index 05c736a7525b836fce8a54eec33c1a9abc083cd7..178717c19eed3f02dd5a56f00077c014313d71cd 100644 (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));
     }