[Fix] Socket flags not saved.

This commit is contained in:
Enrico Giordani
2015-08-20 13:20:58 +02:00
parent 7bf5ba87e2
commit dacd0c0d4c
2 changed files with 3 additions and 9 deletions
+2 -8
View File
@@ -157,16 +157,10 @@ int RFDMap::lookupPosixFD(RFD rfd) {
return posixFD;
}
bool RFDMap::SetSocketFlags(SOCKET s, int flags) {
bool result = false;
void RFDMap::SetSocketFlags(SOCKET s, int flags) {
EnterCriticalSection(&mutex);
SocketToFlagsMapType::iterator sit = SocketToFlagsMap.find(s);
if (sit != SocketToFlagsMap.end()) {
SocketToFlagsMap[s] = flags;
result = true;
}
SocketToFlagsMap[s] = flags;
LeaveCriticalSection(&mutex);
return result;
}
int RFDMap::GetSocketFlags(SOCKET s) {
+1 -1
View File
@@ -116,6 +116,6 @@ public:
/* Returns the socket associated with a file descriptor. */
int lookupPosixFD(RFD rfd);
bool SetSocketFlags(SOCKET s, int flags);
void SetSocketFlags(SOCKET s, int flags);
int GetSocketFlags(SOCKET s);
};