From 3e3138025852408ef03f3213972e042e12841bed Mon Sep 17 00:00:00 2001 From: Chip Black Date: Thu, 3 Jul 2014 18:32:59 -0500 Subject: [PATCH] Return the status of token removal in auth_logout --- common/auth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/auth.c b/common/auth.c index ca4017e..d460b41 100644 --- a/common/auth.c +++ b/common/auth.c @@ -347,6 +347,7 @@ char * auth_login(const char *username, const char *password) { int auth_logout(const char *username, const char *token) { char filename[FILENAME_MAX]; struct stringring *sr; + int ret; if (!valid_name(username)) return 0; @@ -359,10 +360,10 @@ int auth_logout(const char *username, const char *token) { if (sr == NULL) { return 0; } - stringring_remove(sr, token); + ret = stringring_remove(sr, token); stringring_close(sr); - return 1; + return ret; } int auth_check_token(const char *username, const char *given_token) { -- 2.25.1