diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-18 17:36:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-08-18 17:36:59 +0200 |
commit | 67858c6e46b6795893ef1337bef1d86c018cdd9e (patch) | |
tree | 50c7d190d61a49a987760061af1e53b2747ab247 /src/modules/rtp | |
parent | 74719c24f561cd04ba430a69a8885e7b4a05edb6 (diff) |
fix type error
Diffstat (limited to 'src/modules/rtp')
-rw-r--r-- | src/modules/rtp/module-rtp-send.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c index aad21265..1423cbc1 100644 --- a/src/modules/rtp/module-rtp-send.c +++ b/src/modules/rtp/module-rtp-send.c @@ -170,7 +170,7 @@ int pa__init(pa_module*m) { pa_modargs *ma = NULL; const char *dest; uint32_t port = DEFAULT_PORT, mtu; - unsigned char ttl = DEFAULT_TTL; + uint32_t ttl = DEFAULT_TTL; int af, fd = -1, sap_fd = -1; pa_source *s; pa_sample_spec ss; @@ -288,9 +288,13 @@ int pa__init(pa_module*m) { goto fail; } - if (ttl != DEFAULT_TTL && setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0) { - pa_log("IP_MULTICAST_TTL failed: %s", pa_cstrerror(errno)); - goto fail; + if (ttl != DEFAULT_TTL) { + int _ttl = (int) ttl; + + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &_ttl, sizeof(_ttl)) < 0) { + pa_log("IP_MULTICAST_TTL failed: %s", pa_cstrerror(errno)); + goto fail; + } } /* If the socket queue is full, let's drop packets */ |