summaryrefslogtreecommitdiffstats
path: root/src/modules/rtp/rtp.c
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2010-05-08 13:47:19 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-05-08 14:21:52 +0100
commit678f12d0568a50ce81626ca87998da983491be13 (patch)
treeffaaa5da51f75db8c79cbaa61ff1ab2ef55aa3cb /src/modules/rtp/rtp.c
parent74591da68be69f4a4853dbc1d12e7ca5fb8af4cf (diff)
rtp: Fix bracketing in pa_rtp_recv.
The syntactically correct error meant that the timestamp was always marked as found and only the first header was checked. In the case where the timestamp was the first header, things would have worked as expected. Thanks to pino for reporting via bug refs #818
Diffstat (limited to 'src/modules/rtp/rtp.c')
-rw-r--r--src/modules/rtp/rtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index 6706a10f..74f0ac38 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -278,8 +278,8 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
pa_memchunk_reset(&c->memchunk);
}
- for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) {
- if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP)
+ for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
+ if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP) {
memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval));
found_tstamp = TRUE;
break;