struct otp_state state;
};
-static HASH_TABLE(char *, struct sasl_server_mech_request *) otp_lock_table;
+static HASH_TABLE(const char *, struct sasl_server_mech_request *)
+otp_lock_table;
/*
* Locking
{
struct sasl_server_mech_request *auth_request = &request->auth_request;
- if (hash_table_lookup(otp_lock_table,
- auth_request->request->fields.user) != NULL)
+ if (hash_table_lookup(otp_lock_table, auth_request->authid) != NULL)
return FALSE;
- hash_table_insert(otp_lock_table, auth_request->request->fields.user,
- auth_request);
+ hash_table_insert(otp_lock_table, auth_request->authid, auth_request);
request->lock = TRUE;
return TRUE;
}
if (!request->lock)
return;
- hash_table_remove(otp_lock_table, auth_request->request->fields.user);
+ hash_table_remove(otp_lock_table, auth_request->authid);
request->lock = FALSE;
}
container_of(auth_request, struct otp_auth_request,
auth_request);
- if (auth_request->request->fields.user == NULL)
+ if (auth_request->authid == NULL)
mech_otp_auth_phase1(request, data, data_size);
else
mech_otp_auth_phase2(request, data, data_size);