summaryrefslogtreecommitdiff
path: root/admin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'admin.cxx')
-rw-r--r--admin.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/admin.cxx b/admin.cxx
index 4c65c7b..9a49a1f 100644
--- a/admin.cxx
+++ b/admin.cxx
@@ -4,10 +4,11 @@
namespace QInterchange {
- static char *unCopy, *pwCopy, *npCopy, *fpCopy;
+ static char *unCopy, *pwCopy, *npCopy, *spCopy, *fpCopy;
void Admin::logIn(QString const& username, QString const& password,
- QString const& nextPage, QString const& failPage)
+ QString const& nextPage, QString const& successPage,
+ QString const& failPage)
{
auto unData = username.toLatin1().constData();
unCopy = (char*)malloc(strlen(unData) + 1);
@@ -18,14 +19,18 @@ namespace QInterchange {
auto npData = nextPage.toLatin1().constData();
npCopy = (char*)malloc(strlen(npData) + 1);
strcpy(npCopy, npData);
+ auto spData = successPage.toLatin1().constData();
+ spCopy = (char*)malloc(strlen(spData) + 1);
+ strcpy(spCopy, spData);
auto fpData = failPage.toLatin1().constData();
fpCopy = (char*)malloc(strlen(fpData) + 1);
strcpy(fpCopy, fpData);
- interchange_admin_login(unCopy, pwCopy, npCopy, fpCopy,
+ interchange_admin_login(unCopy, pwCopy, npCopy, spCopy, fpCopy,
[](interchange_response* response) {
free(unCopy);
free(pwCopy);
free(npCopy);
+ free(spCopy);
free(fpCopy);
interchange_free_response(response);
}, nullptr);