Skip to content

Commit

Permalink
Merge pull request #7078 from douzzer/20231218-AddSessionToClientCach…
Browse files Browse the repository at this point in the history
…e-round-2

20231218-AddSessionToClientCache-round-2
  • Loading branch information
philljj authored Dec 18, 2023
2 parents 3e483f3 + 7eed28f commit 4e08196
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -14409,19 +14409,19 @@ ClientSession* AddSessionToClientCache(int side, int row, int idx, byte* serverI
}
if (error == 0) {
WOLFSSL_MSG("Adding client cache entry");

ret = &ClientCache[clientRow].Clients[clientIdx];

if (ClientCache[clientRow].totalCount < CLIENT_SESSIONS_PER_ROW)
ClientCache[clientRow].totalCount++;
ClientCache[clientRow].nextIdx++;
ClientCache[clientRow].nextIdx %= CLIENT_SESSIONS_PER_ROW;
}

ret = &ClientCache[clientRow].Clients[clientIdx];

wc_UnLockMutex(&clisession_mutex);
}
else {
WOLFSSL_MSG("Hash session or lock failed");
error = -1;
}
}
else {
Expand Down

0 comments on commit 4e08196

Please sign in to comment.