Merge branch 'development' into LTS_development
This commit is contained in:
commit
c60f96a1cb
2 changed files with 20 additions and 6 deletions
|
@ -1137,7 +1137,11 @@ Socket::Connection::Connection(const Connection &rhs){
|
|||
clear();
|
||||
if (!rhs){return;}
|
||||
#if DEBUG >= DLVL_DEVEL
|
||||
#ifdef SSL
|
||||
HIGH_MSG("Copying %s socket", rhs.sslConnected ? "SSL" : "regular");
|
||||
#else
|
||||
HIGH_MSG("Copying regular socket");
|
||||
#endif
|
||||
#endif
|
||||
conntime = rhs.conntime;
|
||||
isTrueSocket = rhs.isTrueSocket;
|
||||
|
@ -1166,7 +1170,11 @@ Socket::Connection &Socket::Connection::operator=(const Socket::Connection &rhs)
|
|||
clear();
|
||||
if (!rhs){return *this;}
|
||||
#if DEBUG >= DLVL_DEVEL
|
||||
#ifdef SSL
|
||||
HIGH_MSG("Assigning %s socket", rhs.sslConnected ? "SSL" : "regular");
|
||||
#else
|
||||
HIGH_MSG("Assigning regular socket");
|
||||
#endif
|
||||
#endif
|
||||
conntime = rhs.conntime;
|
||||
isTrueSocket = rhs.isTrueSocket;
|
||||
|
@ -1766,6 +1774,11 @@ uint16_t Socket::UDPConnection::bind(int port, std::string iface, const std::str
|
|||
sockaddr_in *addr4 = (sockaddr_in *)(rp->ai_addr);
|
||||
// multicast has a "1110" bit prefix
|
||||
multicast = (((char *)&(addr4->sin_addr))[0] & 0xF0) == 0xE0;
|
||||
#ifdef __CYGWIN__
|
||||
if (multicast){
|
||||
((sockaddr_in*)rp->ai_addr)->sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (multicast){
|
||||
const int optval = 1;
|
||||
|
|
13
src/io.cpp
13
src/io.cpp
|
@ -664,6 +664,9 @@ namespace Mist {
|
|||
DEBUG_MSG(DLVL_FAIL, "Failed to negotiate for incoming track %lu, there does not seem to be a connection with the buffer", tid);
|
||||
return;
|
||||
}
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
static std::map<unsigned long, std::string> preservedTempMetas;
|
||||
#endif
|
||||
unsigned long offset = 6 * trackOffset[tid];
|
||||
//If we have a new track to negotiate
|
||||
if (!trackState.count(tid)) {
|
||||
|
@ -691,9 +694,10 @@ namespace Mist {
|
|||
std::string tmpStr = tmpVal.toNetPacked();
|
||||
memcpy(metaPages[tid].mapped, tmpStr.data(), tmpStr.size());
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
IPC::preservePage(pageName);
|
||||
preservedTempMetas[tid] = pageName;
|
||||
#endif
|
||||
|
||||
snprintf(pageName, NAME_BUFFER_SIZE, SHM_TRACK_INDEX, streamName.c_str(), finalTid);
|
||||
metaPages[tid].init(pageName, SHM_TRACK_INDEX_SIZE, true);
|
||||
|
@ -710,9 +714,6 @@ namespace Mist {
|
|||
}
|
||||
return;
|
||||
}
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
static std::map<unsigned long, std::string> preservedTempMetas;
|
||||
#endif
|
||||
switch (trackState[tid]) {
|
||||
case FILL_NEW: {
|
||||
unsigned long newTid = ((long)(tmp[offset]) << 24) | ((long)(tmp[offset + 1]) << 16) | ((long)(tmp[offset + 2]) << 8) | tmp[offset + 3];
|
||||
|
|
Loading…
Add table
Reference in a new issue