[Sofaswitch-svn] [commit] r61 - sofaswitch/trunk/server
Author: mjerris Date: Wed Aug 9 13:52:05 2006 New Revision: 61 Modified: sofaswitch/trunk/server/main.cxx sofaswitch/trunk/server/main.h Log: Compile changes for msvc 2005. Modified: sofaswitch/trunk/server/main.cxx ============================================================================== --- sofaswitch/trunk/server/main.cxx (original) +++ sofaswitch/trunk/server/main.cxx Wed Aug 9 13:52:05 2006 @@ -24,7 +24,9 @@ * */ +#ifndef _MSC_VER #pragma implementation "main.h" +#endif #include <ptclib/random.h> @@ -517,20 +519,26 @@ cerr << "SetOption(keepalive) failed: " << messagesSocket.GetErrorText() << endl; } +#ifdef TCP_KEEPIDLE if (!messagesSocket.SetOption(TCP_KEEPIDLE, 10, IPPROTO_TCP)) { PTRACE(1, "SetOption(TCP_KEEPIDLE 2) failed: " << messagesSocket.GetErrorText()); cerr << "SetOption(TCP_KEEPIDLE 2) failed: " << messagesSocket.GetErrorText() << endl; } - +#endif + +#ifdef TCP_KEEPCNT if (!messagesSocket.SetOption(TCP_KEEPCNT, 2, IPPROTO_TCP)) { PTRACE(1, "SetOption(TCP_KEEPCNT 2) failed: " << messagesSocket.GetErrorText()); cerr << "SetOption(TCP_KEEPCNT 2) failed: " << messagesSocket.GetErrorText() << endl; } - +#endif + +#ifdef TCP_KEEPINTVL if (!messagesSocket.SetOption(TCP_KEEPINTVL, 10, IPPROTO_TCP)) { PTRACE(1, "SetOption(TCP_KEEPINTVL 2) failed: " << messagesSocket.GetErrorText()); cerr << "SetOption(TCP_KEEPINTVL 2) failed: " << messagesSocket.GetErrorText() << endl; } +#endif if (!messagesSocket.IsOpen()) { PTRACE(1, "Main socket is not open. This is bad "); Modified: sofaswitch/trunk/server/main.h ============================================================================== --- sofaswitch/trunk/server/main.h (original) +++ sofaswitch/trunk/server/main.h Wed Aug 9 13:52:05 2006 @@ -26,7 +26,9 @@ #ifndef _MAIN_H #define _MAIN_H +#ifndef _MSC_VER #pragma interface +#endif #include <ptlib.h> #include <ptlib/sockets.h>
participants (1)
-
SofaSWITCH SVN