mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
get rid of ivars used only for http UI
This commit is contained in:
parent
11d7de5f0d
commit
720f78d18a
5 changed files with 2 additions and 30 deletions
|
@ -86,7 +86,6 @@ CookieRef::ReInit( const char* cookie, const char* connName, CookieID id,
|
|||
m_cookie = cookie==NULL?"":cookie;
|
||||
m_connName = connName==NULL?"":connName;
|
||||
m_cookieID = id;
|
||||
m_totalSent = 0;
|
||||
m_curState = XWS_INITED;
|
||||
m_nPlayersSought = nPlayers;
|
||||
m_nPlayersHere = nAlreadyHere;
|
||||
|
@ -132,9 +131,7 @@ CookieRef::~CookieRef()
|
|||
|
||||
printSeeds(__func__);
|
||||
|
||||
logf( XW_LOGINFO,
|
||||
"CookieRef for %d being deleted; sent %d bytes over lifetime",
|
||||
m_cookieID, m_totalSent );
|
||||
logf( XW_LOGINFO, "CookieRef for %d being deleted", m_cookieID );
|
||||
} /* ~CookieRef */
|
||||
|
||||
void
|
||||
|
@ -729,7 +726,7 @@ CookieRef::send_with_length( int socket, unsigned char* buf, int bufLen,
|
|||
{
|
||||
bool failed = false;
|
||||
if ( send_with_length_unsafe( socket, buf, bufLen ) ) {
|
||||
RecordSent( bufLen, socket );
|
||||
DBMgr::Get()->RecordSent( ConnName(), HostForSocket(socket), bufLen );
|
||||
} else {
|
||||
failed = true;
|
||||
}
|
||||
|
@ -1006,13 +1003,6 @@ CookieRef::send_msg( int socket, HostID id, XWRelayMsg msg, XWREASON why,
|
|||
send_with_length( socket, buf, len, cascade );
|
||||
} /* send_msg */
|
||||
|
||||
|
||||
void
|
||||
CookieRef::RecordSent( int nBytes, int socket ) {
|
||||
m_totalSent += nBytes;
|
||||
DBMgr::Get()->RecordSent( ConnName(), HostForSocket(socket), nBytes );
|
||||
}
|
||||
|
||||
void
|
||||
CookieRef::notifyOthers( int socket, XWRelayMsg msg, XWREASON why )
|
||||
{
|
||||
|
@ -1311,9 +1301,6 @@ CookieRef::_PrintCookieInfo( string& out )
|
|||
snprintf( buf, sizeof(buf), "id=%d\n", GetCookieID() );
|
||||
out += buf;
|
||||
|
||||
snprintf( buf, sizeof(buf), "Bytes sent=%d\n", m_totalSent );
|
||||
out += buf;
|
||||
|
||||
snprintf( buf, sizeof(buf), "Total players=%d\n", m_nPlayersSought );
|
||||
out += buf;
|
||||
snprintf( buf, sizeof(buf), "Players here=%d\n", m_nPlayersHere );
|
||||
|
|
|
@ -81,7 +81,6 @@ class CookieRef {
|
|||
/* Within this cookie, remember that this hostID and socket go together.
|
||||
If the hostID is HOST_ID_SERVER, it's the server. */
|
||||
CookieID GetCookieID() { return m_cookieID; }
|
||||
int GetTotalSent() { return m_totalSent; }
|
||||
int GetPlayersSought() { return m_nPlayersSought; }
|
||||
int GetPlayersHere() { return m_nPlayersHere; }
|
||||
|
||||
|
@ -181,7 +180,6 @@ class CookieRef {
|
|||
bool cascade );
|
||||
void send_msg( int socket, HostID id, XWRelayMsg msg, XWREASON why,
|
||||
bool cascade );
|
||||
void RecordSent( int nBytes, int socket );
|
||||
void pushConnectEvent( int socket, int nPlayersH, int nPlayersS,
|
||||
int seed );
|
||||
void pushReconnectEvent( int socket, HostID srcID,
|
||||
|
@ -258,7 +256,6 @@ class CookieRef {
|
|||
string m_cookie; /* cookie used for initial connections */
|
||||
string m_connName; /* globally unique name */
|
||||
CookieID m_cookieID; /* Unique among current games on this server */
|
||||
int m_totalSent;
|
||||
|
||||
/* Guard the event queue. Only one thread at a time can post to the
|
||||
queue, but once in a thread can post new events while processing
|
||||
|
|
|
@ -174,7 +174,6 @@ CRefMgr::GetStats( CrefMgrInfo& mgrInfo )
|
|||
info.m_connName = cref->ConnName();
|
||||
info.m_cookieID = cref->GetCookieID();
|
||||
info.m_curState = cref->CurState();
|
||||
info.m_totalSent = cref->GetTotalSent();
|
||||
info.m_nPlayersSought = cref->GetPlayersSought();
|
||||
info.m_nPlayersHere = cref->GetPlayersHere();
|
||||
info.m_startTime = cref->GetStarttime();
|
||||
|
|
|
@ -50,7 +50,6 @@ class CrefInfo {
|
|||
string m_cookie;
|
||||
string m_connName;
|
||||
CookieID m_cookieID;
|
||||
int m_totalSent;
|
||||
int m_nPlayersSought;
|
||||
int m_nPlayersHere;
|
||||
XW_RELAY_STATE m_curState;
|
||||
|
@ -329,14 +328,6 @@ class SafeCref {
|
|||
}
|
||||
}
|
||||
|
||||
int GetTotalSent() {
|
||||
if ( IsValid() ) {
|
||||
return m_cref->GetTotalSent();
|
||||
} else {
|
||||
return -1; /* so don't crash.... */
|
||||
}
|
||||
}
|
||||
|
||||
int GetPlayersTotal() {
|
||||
if ( IsValid() ) {
|
||||
return m_cref->GetPlayersSought();
|
||||
|
|
|
@ -152,7 +152,6 @@ printCrefs( FILE* fil, const CrefMgrInfo* info, bool isLocal )
|
|||
"<td>%s</td>" /* conn name */
|
||||
"<td>%d</td>" /* cookie id */
|
||||
"<td>%s</td>" /* conntime */
|
||||
"<td>%d</td>" /* total sent */
|
||||
"<td>%d</td>" /* players */
|
||||
"<td>%d</td>" /* players here */
|
||||
"<td>%s</td>" /* State */
|
||||
|
@ -164,7 +163,6 @@ printCrefs( FILE* fil, const CrefMgrInfo* info, bool isLocal )
|
|||
crefInfo->m_connName.c_str(),
|
||||
crefInfo->m_cookieID,
|
||||
conntime,
|
||||
crefInfo->m_totalSent,
|
||||
crefInfo->m_nPlayersSought, crefInfo->m_nPlayersHere,
|
||||
stateString( crefInfo->m_curState ),
|
||||
crefInfo->m_hostsIds.c_str(),
|
||||
|
|
Loading…
Reference in a new issue