mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 15:36:38 +00:00
Working on shared memory stuff - removed some stuff dealing with older code and loading spells from the non-database
This commit is contained in:
@@ -128,8 +128,6 @@ EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, EmuTCPConne
|
||||
RelayServer = true;
|
||||
RelayCount = 0;
|
||||
RemoteID = iRemoteID;
|
||||
if (!RemoteID)
|
||||
ThrowError("Error: TCPConnection: RemoteID == 0 on RelayLink constructor");
|
||||
pOldFormat = false;
|
||||
ConnectionType = Incomming;
|
||||
TCPMode = modePacket;
|
||||
|
||||
@@ -214,11 +214,6 @@ bool MRMutex::TryReadLock() {
|
||||
void MRMutex::UnReadLock() {
|
||||
MCounters.lock();
|
||||
rl--;
|
||||
#ifdef _EQDEBUG
|
||||
if (rl < 0) {
|
||||
ThrowError("rl < 0 in MRMutex::UnReadLock()");
|
||||
}
|
||||
#endif
|
||||
MCounters.unlock();
|
||||
}
|
||||
|
||||
@@ -261,11 +256,6 @@ bool MRMutex::TryWriteLock() {
|
||||
void MRMutex::UnWriteLock() {
|
||||
MCounters.lock();
|
||||
wl--;
|
||||
#ifdef _EQDEBUG
|
||||
if (wl < 0) {
|
||||
ThrowError("wl < 0 in MRMutex::UnWriteLock()");
|
||||
}
|
||||
#endif
|
||||
MCounters.unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -165,12 +165,6 @@ bool TCPConnection::GetSockName(char *host, uint16 *port)
|
||||
}
|
||||
|
||||
void TCPConnection::Free() {
|
||||
if (ConnectionType == Outgoing) {
|
||||
ThrowError("TCPConnection::Free() called on an Outgoing connection");
|
||||
}
|
||||
#if TCPN_DEBUG_Memory >= 5
|
||||
cout << "Free on TCP# " << GetID() << endl;
|
||||
#endif
|
||||
Disconnect();
|
||||
pFree = true;
|
||||
}
|
||||
@@ -362,7 +356,6 @@ void TCPConnection::AsyncConnect(uint32 irIP, uint16 irPort) {
|
||||
if (ConnectionType != Outgoing) {
|
||||
// If this code runs, we got serious problems
|
||||
// Crash and burn.
|
||||
ThrowError("TCPConnection::AsyncConnect() call on a Incomming connection object!");
|
||||
return;
|
||||
}
|
||||
if(!ConnectReady()) {
|
||||
@@ -423,7 +416,6 @@ bool TCPConnection::ConnectIP(uint32 in_ip, uint16 in_port, char* errbuf) {
|
||||
if (ConnectionType != Outgoing) {
|
||||
// If this code runs, we got serious problems
|
||||
// Crash and burn.
|
||||
ThrowError("TCPConnection::Connect() call on a Incomming connection object!");
|
||||
return false;
|
||||
}
|
||||
MState.lock();
|
||||
@@ -862,7 +854,6 @@ bool TCPConnection::SendData(bool &sent_something, char* errbuf) {
|
||||
ServerSendQueuePushFront(&data[status], size - status);
|
||||
}
|
||||
else if (status > (signed)size) {
|
||||
ThrowError("TCPConnection::SendData(): WTF! status > size");
|
||||
return false;
|
||||
}
|
||||
// else if (status == size) {}
|
||||
@@ -905,7 +896,6 @@ ThreadReturnType TCPConnection::TCPConnectionLoop(void* tmp) {
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
|
||||
#endif
|
||||
if (tmp == 0) {
|
||||
ThrowError("TCPConnectionLoop(): tmp = 0!");
|
||||
THREAD_RETURN(NULL);
|
||||
}
|
||||
TCPConnection* tcpc = (TCPConnection*) tmp;
|
||||
|
||||
@@ -67,7 +67,6 @@ ThreadReturnType BaseTCPServer::TCPServerLoop(void* tmp) {
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
|
||||
#endif
|
||||
if (tmp == 0) {
|
||||
// ThrowError("BaseTCPServerLoop(): tmp = 0!");
|
||||
THREAD_RETURN(NULL);
|
||||
}
|
||||
BaseTCPServer* tcps = (BaseTCPServer*) tmp;
|
||||
|
||||
@@ -55,15 +55,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ThrowError
|
||||
void CatchSignal(int);
|
||||
#if defined(CATCH_CRASH) || defined(_EQDEBUG)
|
||||
#define ThrowError(errstr) { cout << "Fatal error: " << errstr << " (" << __FILE__ << ", line " << __LINE__ << ")" << endl; LogFile->write(EQEMuLog::Error, "Thown Error: %s (%s:%i)", errstr, __FILE__, __LINE__); throw errstr; }
|
||||
#else
|
||||
#define ThrowError(errstr) { cout << "Fatal error: " << errstr << " (" << __FILE__ << ", line " << __LINE__ << ")" << endl; LogFile->write(EQEMuLog::Error, "Thown Error: %s (%s:%i)", errstr, __FILE__, __LINE__); CatchSignal(0); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
// VS6 doesn't like the length of STL generated names: disabling
|
||||
#pragma warning(disable:4786)
|
||||
|
||||
Reference in New Issue
Block a user