Cleanup to remove duplicate stat sslResumptionValid. Add print of sslResumptionInserts.

This commit is contained in:
David Garske
2021-07-08 09:49:13 -07:00
parent ddbe0e6dab
commit 4cb076f22b
3 changed files with 4 additions and 5 deletions

View File

@ -2821,7 +2821,6 @@ static int DoResume(SnifferSession* session, char* error)
Trace(SERVER_DID_RESUMPTION_STR);
#ifdef WOLFSSL_SNIFFER_STATS
INC_STAT(SnifferStats.sslResumedConns);
INC_STAT(SnifferStats.sslResumptionValid);
#endif
if (SetCipherSpecs(session->sslServer) != 0) {
SetError(BAD_CIPHER_SPEC_STR, error, session, FATAL_ERROR_STATE);
@ -3607,9 +3606,9 @@ static int ProcessFinished(const byte* input, int size, int* sslBytes,
WOLFSSL_SESSION* sess = GetSession(session->sslServer, NULL, 0);
if (sess == NULL) {
AddSession(session->sslServer); /* don't re add */
#ifdef WOLFSSL_SNIFFER_STATS
#ifdef WOLFSSL_SNIFFER_STATS
INC_STAT(SnifferStats.sslResumptionInserts);
#endif
#endif
}
session->flags.cached = 1;
}

View File

@ -170,6 +170,8 @@ static void DumpStats(void)
sslStats.sslResumedConns);
printf("SSL Stats (sslEphemeralMisses):%lu\n",
sslStats.sslEphemeralMisses);
printf("SSL Stats (sslResumptionInserts):%lu\n",
sslStats.sslResumptionInserts);
printf("SSL Stats (sslResumeMisses):%lu\n",
sslStats.sslResumeMisses);
printf("SSL Stats (sslCiphersUnsupported):%lu\n",

View File

@ -183,8 +183,6 @@ typedef struct SSLStats
unsigned long int sslDecryptedPackets;
unsigned long int sslKeyMatches;
unsigned long int sslEncryptedConns;
unsigned long int sslResumptionValid;
unsigned long int sslResumptionInserts;
} SSLStats;