summaryrefslogtreecommitdiffstats
path: root/src/modules/rtp/module-rtp-send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/rtp/module-rtp-send.c')
-rw-r--r--src/modules/rtp/module-rtp-send.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index d7c50578..95ff15de 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -179,11 +179,11 @@ int pa__init(pa_module*m) {
pa_source_output *o = NULL;
uint8_t payload;
char *p;
- int r;
+ int r, j;
socklen_t k;
struct timeval tv;
char hn[128], *n;
- int loop = 0;
+ pa_bool_t loop = FALSE;
pa_source_output_new_data data;
pa_assert(m);
@@ -274,8 +274,9 @@ int pa__init(pa_module*m) {
goto fail;
}
- if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0 ||
- setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0) {
+ j = !!loop;
+ if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0 ||
+ setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0) {
pa_log("IP_MULTICAST_LOOP failed: %s", pa_cstrerror(errno));
goto fail;
}