168 memcpy(key, authdb, authdblen); |
168 memcpy(key, authdb, authdblen); |
169 key[authdblen] = 0; |
169 key[authdblen] = 0; |
170 memcpy(key + authdblen + 1, user->name, userlen); |
170 memcpy(key + authdblen + 1, user->name, userlen); |
171 UcxKey mapkey = ucx_key(key, keylen); |
171 UcxKey mapkey = ucx_key(key, keylen); |
172 |
172 |
173 elm->key = mapkey; |
173 elm->key.data = key; |
|
174 elm->key.len = mapkey.len; |
|
175 elm->key.hash = mapkey.hash; |
174 elm->slot = mapkey.hash%cache.size; |
176 elm->slot = mapkey.hash%cache.size; |
175 |
177 |
176 // add user to list and map |
178 // add user to list and map |
177 pthread_mutex_lock(&auth_cache_mutex); |
179 pthread_mutex_lock(&auth_cache_mutex); |
178 |
180 |