diff options
Diffstat (limited to 'admin.cxx')
-rw-r--r-- | admin.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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); |