Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix session count types #398

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ struct p11prov_session_pool {
P11PROV_CTX *provctx;
CK_SLOT_ID slotid;

int num_sessions;
int max_sessions;
int open_sessions;
int max_cached_sessions;
CK_ULONG num_sessions;
CK_ULONG max_sessions;
CK_ULONG open_sessions;
CK_ULONG max_cached_sessions;

P11PROV_SESSION **sessions;

Expand Down Expand Up @@ -274,7 +274,7 @@ static CK_RV session_new(P11PROV_SESSION_POOL *pool, P11PROV_SESSION **_session)

if (pool->num_sessions >= pool->max_sessions) {
ret = CKR_SESSION_COUNT;
P11PROV_raise(pool->provctx, ret, "Max sessions (%d) exceeded",
P11PROV_raise(pool->provctx, ret, "Max sessions (%lu) exceeded",
pool->max_sessions);
return ret;
}
Expand Down Expand Up @@ -304,7 +304,7 @@ static CK_RV session_new(P11PROV_SESSION_POOL *pool, P11PROV_SESSION **_session)

pool->sessions[pool->num_sessions] = session;
pool->num_sessions++;
P11PROV_debug("Total sessions: %d", pool->num_sessions);
P11PROV_debug("Total sessions: %lu", pool->num_sessions);

*_session = session;
return CKR_OK;
Expand Down
Loading