aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-06-14 15:02:34 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-06-14 15:02:34 +0000
commit2ac58e2aab404c5955dec21b3061fd9298091599 (patch)
treee05011765dfa06e5c667294ce645050d8557bbcb
parenta03efb74e50da550ea8f03d75e8eab94744a84b8 (diff)
checked in patch from tracker 1667928 to fix multicast porting binding bug
svn path=/trunk/externals/OSCx/; revision=7776
-rw-r--r--src/dumpOSC.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dumpOSC.c b/src/dumpOSC.c
index 81f5b13..09f4e76 100644
--- a/src/dumpOSC.c
+++ b/src/dumpOSC.c
@@ -305,8 +305,12 @@ static void *dumpOSC_new(t_symbol *compatflag,
// ss 2006
if (castgroup) {
struct ip_mreq mreq;
+ int t = 1;
mreq.imr_multiaddr.s_addr = inet_addr(castgroup->s_name);
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ if (setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&t,sizeof(t)) < 0) {
+ sys_sockerror("setsockopt");
+ }
if (setsockopt(sockfd,IPPROTO_IP,IP_ADD_MEMBERSHIP,(char*)&mreq,sizeof(mreq)) < 0) {
sys_sockerror("setsockopt");
}