From dbc23d9db6e3ecd5411df7c8e59e7ec48f4975d6 Mon Sep 17 00:00:00 2001 From: alexhudson Date: Sat, 17 Jul 2010 16:44:18 +0000 Subject: [PATCH] Make cookie expiration timer work correctly.... --- include/msgapi.h | 2 +- src/agents/store/cookie.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/msgapi.h b/include/msgapi.h index f2630ae..15c5c57 100644 --- a/include/msgapi.h +++ b/include/msgapi.h @@ -44,7 +44,7 @@ EXPORT void MsgAuthUserListFree(char **list[]); // Auth / cookie functions -#define MSGAUTH_COOKIE_LEN 32 +#define MSGAUTH_COOKIE_LEN XPLHASH_MD5_LENGTH + 1 typedef struct { char token[MSGAUTH_COOKIE_LEN]; diff --git a/src/agents/store/cookie.c b/src/agents/store/cookie.c index 1dd626e..e7537b0 100644 --- a/src/agents/store/cookie.c +++ b/src/agents/store/cookie.c @@ -39,7 +39,7 @@ StoreCommandCOOKIENEW(StoreClient *client, uint64_t timeout) if (MsgAuthCreateCookie(client->principal.name, &cookie, timeout)) { ccode = ConnWriteF(client->conn, "1000 %.32s\r\n", cookie.token); } else { - ccode = ConnWriteStr(client->conn, MSG5004INTERNALERR); + ccode = ConnWriteStr(client->conn, MSG5004INTERNALERR); } return ccode;