mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
further attempted changes for ipMIDI on windows
This commit is contained in:
parent
e9e477ffe5
commit
c92af555b4
1 changed files with 5 additions and 3 deletions
|
|
@ -212,6 +212,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Will Hall, Oct 2007
|
// Will Hall, Oct 2007
|
||||||
|
#ifndef PLATFORM_WINDOWS
|
||||||
if (!ifname.empty()) {
|
if (!ifname.empty()) {
|
||||||
struct in_addr if_addr_out;
|
struct in_addr if_addr_out;
|
||||||
if (!get_address(sockout, &if_addr_out, ifname)) {
|
if (!get_address(sockout, &if_addr_out, ifname)) {
|
||||||
|
|
@ -223,6 +224,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
::memset(&addrout, 0, sizeof(struct sockaddr_in));
|
::memset(&addrout, 0, sizeof(struct sockaddr_in));
|
||||||
addrout.sin_family = AF_INET;
|
addrout.sin_family = AF_INET;
|
||||||
|
|
@ -249,14 +251,14 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname)
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// If iMode!=0, non-blocking mode is enabled.
|
// If imode !=0, non-blocking mode is enabled.
|
||||||
u_long mode=1;
|
u_long mode=1;
|
||||||
if (ioctlsocket(sockin,FIONBIO,&imode)) {
|
if (ioctlsocket(sockin,FIONBIO,&mode)) {
|
||||||
error << "cannot set non-blocking mode for IP MIDI input socket (" << ::strerror (errno) << ')' << endmsg;
|
error << "cannot set non-blocking mode for IP MIDI input socket (" << ::strerror (errno) << ')' << endmsg;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
imode = 1;
|
imode = 1;
|
||||||
if (ioctlsocket(sockout,FIONBIO,&iMode)) {
|
if (ioctlsocket(sockout,FIONBIO,&mode)) {
|
||||||
error << "cannot set non-blocking mode for IP MIDI output socket (" << ::strerror (errno) << ')' << endmsg;
|
error << "cannot set non-blocking mode for IP MIDI output socket (" << ::strerror (errno) << ')' << endmsg;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue