From 9727ccb405c79127a6d9bd53cba2e5dfe010f9d5 Mon Sep 17 00:00:00 2001 From: alexhudson Date: Mon, 15 Oct 2007 09:03:00 +0000 Subject: [PATCH] Correctly read the cookies file to extract valid cookies --- src/libs/msgapi/cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/msgapi/cookie.c b/src/libs/msgapi/cookie.c index 24ad7c8..b18b760 100644 --- a/src/libs/msgapi/cookie.c +++ b/src/libs/msgapi/cookie.c @@ -96,7 +96,7 @@ MsgAuthFindCookie(const char *username, const char *token) cookiefile = fopen(path, "r"); if (! cookiefile) return 2; - while (fread(&cookie, 1, sizeof(MsgAuthCookie), cookiefile) != sizeof(MsgAuthCookie)) { + while (fread(&cookie, 1, sizeof(MsgAuthCookie), cookiefile) == sizeof(MsgAuthCookie)) { if (cookie.expiration < now) { expired_tokens = TRUE; continue;