fix warning caused by an ucx update that changed UcxKey data to const

Tue, 01 Nov 2022 15:27:48 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 01 Nov 2022 15:27:48 +0100
changeset 400
d814b29e8d96
parent 399
05d4e75d1912
child 401
d2bfd11d3f8f

fix warning caused by an ucx update that changed UcxKey data to const

src/server/daemon/auth.c file | annotate | diff | comparison | revisions
src/server/daemon/auth.h file | annotate | diff | comparison | revisions
--- a/src/server/daemon/auth.c	Sun Oct 23 11:41:05 2022 +0200
+++ b/src/server/daemon/auth.c	Tue Nov 01 15:27:48 2022 +0100
@@ -170,7 +170,9 @@
     memcpy(key + authdblen + 1, user->name, userlen);
     UcxKey mapkey = ucx_key(key, keylen);
     
-    elm->key = mapkey;
+    elm->key.data = key;
+    elm->key.len = mapkey.len;
+    elm->key.hash = mapkey.hash;
     elm->slot = mapkey.hash%cache.size;
     
     // add user to list and map
--- a/src/server/daemon/auth.h	Sun Oct 23 11:41:05 2022 +0200
+++ b/src/server/daemon/auth.h	Tue Nov 01 15:27:48 2022 +0100
@@ -52,7 +52,7 @@
 struct user_cache_elm {
     CachedUser       *user;
     UserCacheElm     *next_user; // next elm in the cached user list
-    UcxKey           key;        // key to access this element
+    struct UcxMapKey key;        // key to access this element
     size_t           slot;       // slot in the map
     UserCacheElm     *next_elm;  // next element in this map slot
     time_t           created;

mercurial