mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-08-08 05:06:55 +02:00
create a copy of document root string
This commit is contained in:
parent
d67a2e6ea5
commit
e0e13fe2ed
1 changed files with 5 additions and 3 deletions
|
@ -325,12 +325,14 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
||||||
// setup the mongoose web server
|
// setup the mongoose web server
|
||||||
struct mg_callbacks callbacks = {};
|
struct mg_callbacks callbacks = {};
|
||||||
|
|
||||||
QString documentRoot = QString("%1/resources/web").arg(QCoreApplication::applicationDirPath());
|
QString documentRootString = QString("%1/resources/web").arg(QCoreApplication::applicationDirPath());
|
||||||
qDebug("The document root is %s\n", documentRoot.toLocal8Bit().constData());
|
|
||||||
|
char documentRoot[documentRootString.size() + 1];
|
||||||
|
strcpy(documentRoot, documentRootString.toLocal8Bit().constData());
|
||||||
|
|
||||||
// list of options. Last element must be NULL.
|
// list of options. Last element must be NULL.
|
||||||
const char* options[] = {"listening_ports", "8080",
|
const char* options[] = {"listening_ports", "8080",
|
||||||
"document_root", documentRoot.toLocal8Bit().constData(), NULL};
|
"document_root", documentRoot, NULL};
|
||||||
|
|
||||||
callbacks.begin_request = civetwebRequestHandler;
|
callbacks.begin_request = civetwebRequestHandler;
|
||||||
callbacks.upload = civetwebUploadHandler;
|
callbacks.upload = civetwebUploadHandler;
|
||||||
|
|
Loading…
Reference in a new issue