[Box Backup-commit] COMMIT r1573 - box/chris/general/lib/server
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Sun Apr 22 21:36:45 BST 2007
Author: chris
Date: 2007-04-22 21:36:45 +0100 (Sun, 22 Apr 2007)
New Revision: 1573
Modified:
box/chris/general/lib/server/ServerStream.h
Log:
Ignore attempts to listen on a Unix socket on Win32, so that we can share
config files for the unit tests.
Modified: box/chris/general/lib/server/ServerStream.h
===================================================================
--- box/chris/general/lib/server/ServerStream.h 2007-04-22 20:02:40 UTC (rev 1572)
+++ box/chris/general/lib/server/ServerStream.h 2007-04-22 20:36:45 UTC (rev 1573)
@@ -170,6 +170,9 @@
}
else if(c[0] == "unix")
{
+ #ifdef WIN32
+ BOX_WARNING("Ignoring request to listen on a Unix socket on Windows: " << addrlist[a]);
+ #else
// Check arguments size
if(c.size() != 2)
{
@@ -180,6 +183,7 @@
::unlink(c[1].c_str());
psocket->Listen(Socket::TypeUNIX, c[1].c_str());
+ #endif // WIN32
}
else
{
@@ -187,8 +191,11 @@
THROW_EXCEPTION(ServerException, ServerStreamBadListenAddrs)
}
- // Add to list of sockets
- mSockets.push_back(psocket);
+ if (psocket != NULL)
+ {
+ // Add to list of sockets
+ mSockets.push_back(psocket);
+ }
}
catch(...)
{
@@ -196,8 +203,11 @@
throw;
}
- // Add to the list of things to wait on
- connectionWait.Add(psocket);
+ if (psocket != NULL)
+ {
+ // Add to the list of things to wait on
+ connectionWait.Add(psocket);
+ }
}
}
More information about the Boxbackup-commit
mailing list