mirror of
https://github.com/glest/glest-source.git
synced 2025-08-10 10:24:01 +02:00
attempt to fix crash of irc client on exit
This commit is contained in:
@@ -58,6 +58,8 @@ protected:
|
||||
static const char *globalCacheContainerName;
|
||||
|
||||
std::vector<string> argv;
|
||||
|
||||
Mutex mutexIRCSession;
|
||||
irc_session_t *ircSession;
|
||||
|
||||
string execute_cmd_onconnect;
|
||||
@@ -79,6 +81,8 @@ protected:
|
||||
|
||||
bool wantToLeaveChannel;
|
||||
|
||||
int irc_run_session(irc_session_t * session);
|
||||
|
||||
public:
|
||||
|
||||
IRCThread(const std::vector<string> &argv,IRCCallbackInterface *callbackObj);
|
||||
|
@@ -50,6 +50,20 @@ using namespace Shared::PlatformCommon;
|
||||
|
||||
namespace Shared { namespace Platform {
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#define PLATFORM_SOCKET_TRY_AGAIN WSAEWOULDBLOCK
|
||||
#define PLATFORM_SOCKET_INPROGRESS WSAEINPROGRESS
|
||||
#define PLATFORM_SOCKET_INTERRUPTED WSAEWOULDBLOCK
|
||||
|
||||
#else
|
||||
|
||||
#define PLATFORM_SOCKET_TRY_AGAIN EAGAIN
|
||||
#define PLATFORM_SOCKET_INPROGRESS EINPROGRESS
|
||||
#define PLATFORM_SOCKET_INTERRUPTED EINTR
|
||||
|
||||
#endif
|
||||
|
||||
// The callback Interface used by the UPNP discovery process
|
||||
class FTPClientValidationInterface {
|
||||
public:
|
||||
@@ -137,6 +151,10 @@ public:
|
||||
Socket();
|
||||
virtual ~Socket();
|
||||
|
||||
static int getLastSocketError();
|
||||
static const char * getLastSocketErrorText(int *errNumber=NULL);
|
||||
static string getLastSocketErrorFormattedText(int *errNumber=NULL);
|
||||
|
||||
static bool disableNagle;
|
||||
static int DEFAULT_SOCKET_SENDBUF_SIZE;
|
||||
static int DEFAULT_SOCKET_RECVBUF_SIZE;
|
||||
|
Reference in New Issue
Block a user