summaryrefslogtreecommitdiff
path: root/admin.cxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-01-16 07:09:31 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-01-16 07:09:31 +0800
commitfa5129b1b4443c948c998f8eeb6dd191cf2a549e (patch)
tree3671ebdb81ed26c064d9804dcb63dcadbe1017f6 /admin.cxx
parent1e3acb613c9bfcc87c88aa6bfde2b21330dd7dd3 (diff)
Conform to failpage param
Diffstat (limited to 'admin.cxx')
-rw-r--r--admin.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/admin.cxx b/admin.cxx
index 263c658..ffc4fe8 100644
--- a/admin.cxx
+++ b/admin.cxx
@@ -4,9 +4,10 @@
namespace QInterchange {
- static char *unCopy, *pwCopy;
+ static char *unCopy, *pwCopy, *fpCopy;
- void Admin::logIn(QString const& username, QString const& password)
+ void Admin::logIn(QString const& username, QString const& password,
+ QString const& failPage)
{
auto unData = username.toLatin1().constData();
unCopy = (char*)malloc(strlen(unData) + 1);
@@ -14,9 +15,14 @@ namespace QInterchange {
auto pwData = password.toLatin1().constData();
pwCopy = (char*)malloc(strlen(pwData) + 1);
strcpy(pwCopy, pwData);
- interchange_admin_login(unCopy, pwCopy, [](interchange_response* response) {
+ auto fpData = failPage.toLatin1().constData();
+ fpCopy = (char*)malloc(strlen(fpData) + 1);
+ strcpy(fpCopy, fpData);
+ interchange_admin_login(unCopy, pwCopy, fpCopy,
+ [](interchange_response* response) {
free(unCopy);
free(pwCopy);
+ free(fpCopy);
interchange_free_response(response);
}, nullptr);
}