mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 11:13:06 +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
|
||||
struct mg_callbacks callbacks = {};
|
||||
|
||||
QString documentRoot = QString("%1/resources/web").arg(QCoreApplication::applicationDirPath());
|
||||
qDebug("The document root is %s\n", documentRoot.toLocal8Bit().constData());
|
||||
QString documentRootString = QString("%1/resources/web").arg(QCoreApplication::applicationDirPath());
|
||||
|
||||
char documentRoot[documentRootString.size() + 1];
|
||||
strcpy(documentRoot, documentRootString.toLocal8Bit().constData());
|
||||
|
||||
// list of options. Last element must be NULL.
|
||||
const char* options[] = {"listening_ports", "8080",
|
||||
"document_root", documentRoot.toLocal8Bit().constData(), NULL};
|
||||
"document_root", documentRoot, NULL};
|
||||
|
||||
callbacks.begin_request = civetwebRequestHandler;
|
||||
callbacks.upload = civetwebUploadHandler;
|
||||
|
|
Loading…
Reference in a new issue