| 88 | |
| 89 | |
| 90 | void CClientCredits::AddUploaded(uint32 bytes, uint32 dwForIP, bool cryptoavail) |
| 91 | { |
| 92 | switch (GetCurrentIdentState(dwForIP)) { |
| 93 | case IS_IDFAILED: |
| 94 | case IS_IDBADGUY: |
| 95 | case IS_IDNEEDED: |
| 96 | if (cryptoavail) { |
| 97 | return; |
| 98 | } |
| 99 | break; |
| 100 | case IS_NOTAVAILABLE: |
| 101 | case IS_IDENTIFIED: |
| 102 | break; |
| 103 | } |
| 104 | |
| 105 | m_pCredits->uploaded += bytes; |
| 106 | } |
| 107 | |
| 108 | |
| 109 | uint64 CClientCredits::GetUploadedTotal() const |