kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
023a6bd3fb
commit
6fa16ea77f
|
@ -306,7 +306,7 @@ int multicast_init(RIG *rig, char *addr, int port)
|
||||||
|
|
||||||
// Join the multicast group
|
// Join the multicast group
|
||||||
if (setsockopt(rig->state.multicast->sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
|
if (setsockopt(rig->state.multicast->sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
|
||||||
&rig->state.multicast->mreq, sizeof(rig->state.multicast->mreq)) < 0)
|
(char*)&rig->state.multicast->mreq, sizeof(rig->state.multicast->mreq)) < 0)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: setsockopt: %s\n", __func__, strerror(errno));
|
rig_debug(RIG_DEBUG_ERR, "%s: setsockopt: %s\n", __func__, strerror(errno));
|
||||||
return -RIG_EIO;
|
return -RIG_EIO;
|
||||||
|
@ -333,7 +333,7 @@ void multicast_close(RIG *rig)
|
||||||
|
|
||||||
// Leave the multicast group
|
// Leave the multicast group
|
||||||
if ((retval = setsockopt(rig->state.multicast->sock, IPPROTO_IP,
|
if ((retval = setsockopt(rig->state.multicast->sock, IPPROTO_IP,
|
||||||
IP_DROP_MEMBERSHIP, &rig->state.multicast->mreq,
|
IP_DROP_MEMBERSHIP, (char*)&rig->state.multicast->mreq,
|
||||||
sizeof(rig->state.multicast->mreq))) < 0)
|
sizeof(rig->state.multicast->mreq))) < 0)
|
||||||
{
|
{
|
||||||
rig_debug(RIG_DEBUG_ERR, "%s: setsockopt: %s\n", __func__, strerror(errno));
|
rig_debug(RIG_DEBUG_ERR, "%s: setsockopt: %s\n", __func__, strerror(errno));
|
||||||
|
|
Ładowanie…
Reference in New Issue