From f7a913ed569b0c0d7d3b25a18efbf994fe713663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Mon, 13 Mar 2023 13:15:19 +0800 Subject: Clearing member is separated from logging out --- interchange/member.h | 3 ++- member.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/interchange/member.h b/interchange/member.h index e18b752..a8d5262 100644 --- a/interchange/member.h +++ b/interchange/member.h @@ -91,7 +91,8 @@ void interchange_member_setaccount(const struct interchange_member *member, void interchange_member_changepassword(const char *password_old, const char *password, const char *verify); -void interchange_member_logout(struct interchange_member *member); +void interchange_member_logout(); +void interchange_member_clear(struct interchange_member *member); #ifdef __cplusplus } diff --git a/member.c b/member.c index b92b59a..90805a2 100644 --- a/member.c +++ b/member.c @@ -57,9 +57,13 @@ void interchange_member_changepassword(const char *password_old, const char *pas }}, "%s", "member/change_password"); } -void interchange_member_logout(struct interchange_member *member) +void interchange_member_logout() { request(NULL, NULL, NULL, "%s", "logout"); +} + +void interchange_member_clear(struct interchange_member *member) +{ if (member->username) free(member->username); if (member->usernick) @@ -148,5 +152,4 @@ void interchange_member_logout(struct interchange_member *member) free(member->credit_limit); if (member->price_level) free(member->price_level); - free(member); } -- cgit v1.2.3