aMule Bug Tracker - aMule
View Issue Details
0000709aMuleExternal Connpublic2005-12-09 09:392005-12-09 23:27
Jacobo221 
Kry 
normalminoralways
closedopen 
 
 
0000709: statistics item wrongly coded
Statistics has an item in the tree which is titled "HasSocket". It is supposed to show the number of clients which have been assigned a socket, but it doesn't work.

It's count is incremented and decremented from SetSocket(). This function is correctly called when destrying sockets, but not when creating them:

CUpDownClient::CUpDownClient(CClientTCPSocket* sender)
{
#ifdef __DEBUG__
        m_socket = NULL;
        SetSocket(sender);
#else
        m_socket = sender;
#endif
        Init();
}

It will only called in Debug builds.

Consutrctor CUpDownClient::CUpDownClient(uint16 in_port, uint32 in_userid, uint32 in_serverip, uint16 in_serverport, CPartFile* in_reqfile, bool ed2kID, bool checkfrien
d) coesn't call SetSocket(), but I'm don't know if it should. Actually I think it is ok not calling it.
No tags attached.
Issue History
2005-12-09 09:39Jacobo221New Issue
2005-12-09 23:23KryNote Added: 0001606
2005-12-09 23:27KryStatusnew => assigned
2005-12-09 23:27KryAssigned To => Kry
2005-12-09 23:27KryStatusassigned => closed
2005-12-09 23:27KryNote Added: 0001607

Notes
(0001606)
Kry   
2005-12-09 23:23   
HasSocket() must only be shown on debug, as it's basically for me. And so I coded it.
(0001607)
Kry   
2005-12-09 23:27   
#ifdef __DEBUG__
    s_hasSocket = (CStatTreeItemNativeCounter*)s_clients->AddChild(new CStatTreeItemNativeCounter(wxT("HasSocket: %s")), 3);
#endif