summaryrefslogtreecommitdiffstats
path: root/src/afb-session.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-07 09:31:29 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-02-09 17:26:05 +0100
commit3e95cd69de2d08d8175ec4fcbca73f37fcef1b30 (patch)
treebe1f11792a17c3cd5b96466ee9a8a4f4364a8c1d /src/afb-session.c
parent098d6d3c8fb0aff78528746115d0f481da76e5fb (diff)
afb-session: Fix a typo
Change-Id: Ia834cfd203ab1471efa21ce650fcd7895370dc63 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-session.c')
-rw-r--r--src/afb-session.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/afb-session.c b/src/afb-session.c
index 6b6ad634..fd8e3885 100644
--- a/src/afb-session.c
+++ b/src/afb-session.c
@@ -33,8 +33,8 @@
#define SIZEUUID 37
#define HEADCOUNT 16
-#define COOKEYCOUNT 8
-#define COOKEYMASK (COOKEYCOUNT - 1)
+#define COOKIECOUNT 8
+#define COOKIEMASK (COOKIECOUNT - 1)
#define _MAXEXP_ ((time_t)(~(time_t)0))
#define _MAXEXP2_ ((time_t)((((unsigned long long)_MAXEXP_) >> 1)))
@@ -56,7 +56,7 @@ struct afb_session
int timeout;
time_t expiration; // expiration time of the token
pthread_mutex_t mutex;
- struct cookie *cookies[COOKEYCOUNT];
+ struct cookie *cookies[COOKIECOUNT];
char autoclose;
char idx;
char uuid[SIZEUUID]; // long term authentication of remote client
@@ -98,7 +98,7 @@ static void close_session(struct afb_session *session)
struct cookie *cookie;
/* free cookies */
- for (idx = 0 ; idx < COOKEYCOUNT ; idx++) {
+ for (idx = 0 ; idx < COOKIECOUNT ; idx++) {
while ((cookie = session->cookies[idx])) {
session->cookies[idx] = cookie->next;
if (cookie->freecb != NULL)
@@ -458,7 +458,7 @@ static int cookeyidx(const void *key)
{
intptr_t x = (intptr_t)key;
unsigned r = (unsigned)((x >> 5) ^ (x >> 15));
- return r & COOKEYMASK;
+ return r & COOKIEMASK;
}
/**