mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
momo ip midi debugging
This commit is contained in:
parent
b520db4687
commit
cd27f742d4
1 changed files with 14 additions and 2 deletions
|
|
@ -231,6 +231,18 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
addrout.sin_addr.s_addr = ::inet_addr("225.0.0.37");
|
addrout.sin_addr.s_addr = ::inet_addr("225.0.0.37");
|
||||||
addrout.sin_port = htons (base_port);
|
addrout.sin_port = htons (base_port);
|
||||||
|
|
||||||
|
struct sockaddr_in any;
|
||||||
|
::memset(&any, 0, sizeof(struct sockaddr_in));
|
||||||
|
addrout.sin_family = AF_INET;
|
||||||
|
addrout.sin_addr.s_addr = INADDR_ANY;
|
||||||
|
addrout.sin_port = htons (base_port);
|
||||||
|
|
||||||
|
if (::bind(sockout, (struct sockaddr *) (&any), sizeof(any)) < 0) {
|
||||||
|
::perror("bind");
|
||||||
|
cout << "ipmidi bind error\n";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef PLATFORM_WINDOWS
|
#ifndef PLATFORM_WINDOWS
|
||||||
int loop;
|
int loop;
|
||||||
socklen_t size;
|
socklen_t size;
|
||||||
|
|
@ -239,7 +251,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
int size;
|
int size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (::getsockopt (sockin, IPPROTO_IP, IP_MULTICAST_LOOP, (char *) &loop, &size)) {
|
if (::getsockopt (sockout, IPPROTO_IP, IP_MULTICAST_LOOP, (char *) &loop, &size)) {
|
||||||
// ::perror ("getsockopt(IP_MULTICAST_LOOP)");
|
// ::perror ("getsockopt(IP_MULTICAST_LOOP)");
|
||||||
cout << "Cannot get loopback status\n";
|
cout << "Cannot get loopback status\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -254,7 +266,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (::getsockopt (sockin, IPPROTO_IP, IP_MULTICAST_LOOP, (char *) &loop, &size)) {
|
if (::getsockopt (sockout, IPPROTO_IP, IP_MULTICAST_LOOP, (char *) &loop, &size)) {
|
||||||
// ::perror ("getsockopt(IP_MULTICAST_LOOP)");
|
// ::perror ("getsockopt(IP_MULTICAST_LOOP)");
|
||||||
cout << "Cannot Get loopback status 2\n";
|
cout << "Cannot Get loopback status 2\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue