diff --git a/ChangeLog b/ChangeLog index 35498a3e..eff64462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,10 @@ John Emmas Jackdmp changes log --------------------------- +2011-11-06 Stephane Letz + + * Enable local access in NetJack2 code. + 2011-11-04 Stephane Letz * Fix jack_set_port_name API. diff --git a/common/JackNetInterface.cpp b/common/JackNetInterface.cpp index 32e2ed2f..55ce0be5 100644 --- a/common/JackNetInterface.cpp +++ b/common/JackNetInterface.cpp @@ -713,10 +713,14 @@ namespace Jack return NET_SOCKET_ERROR; } - // bind the socket - if (fSocket.Bind() == SOCKET_ERROR) { - jack_error("Can't bind the socket : %s", StrError(NET_ERROR_CODE)); - return NET_SOCKET_ERROR; + if (fSocket.IsLocal(fMulticastIP)) { + jack_info("Local IP is used..."); + } else { + // bind the socket + if (fSocket.Bind() == SOCKET_ERROR) { + jack_error("Can't bind the socket : %s", StrError(NET_ERROR_CODE)); + return NET_SOCKET_ERROR; + } } // timeout on receive