Skip to content
Permalink
Browse files

[bugfix][server] Fixes #13291

  • Loading branch information
elpaso committed Feb 24, 2016
1 parent 1af724f commit 689cbad891ffcd2a3d5501d83fe0bb7f15e2131d
Showing with 6 additions and 7 deletions.
  1. +5 −6 src/server/qgsserver.cpp
  2. +1 −1 src/server/qgsserver.h
@@ -59,7 +59,7 @@
// Default values are for C++, SIP bindings will override their
// options in in init()

QString QgsServer::sConfigFilePath = QString();
QString* QgsServer::sConfigFilePath = nullptr;
QgsCapabilitiesCache* QgsServer::sCapabilitiesCache = nullptr;
QgsMapRenderer* QgsServer::sMapRenderer = nullptr;
#ifdef HAVE_SERVER_PYTHON_PLUGINS
@@ -403,10 +403,9 @@ bool QgsServer::init( int & argc, char ** argv )
defaultConfigFilePath = adminSLDFileInfo.absoluteFilePath();
}
}
if ( !defaultConfigFilePath.isEmpty() )
{
sConfigFilePath = defaultConfigFilePath;
}
// Store the config file path
sConfigFilePath = new QString( defaultConfigFilePath );


//create cache for capabilities XML
sCapabilitiesCache = new QgsCapabilitiesCache();
@@ -514,7 +513,7 @@ QPair<QByteArray, QByteArray> QgsServer::handleRequest( const QString& queryStri
printRequestParameters( parameterMap, logLevel );
QMap<QString, QString>::const_iterator paramIt;
//Config file path
QString configFilePath = configPath( sConfigFilePath, parameterMap );
QString configFilePath = configPath( *sConfigFilePath, parameterMap );
#ifdef HAVE_SERVER_PYTHON_PLUGINS
sServerInterface->setConfigFilePath( configFilePath );
#endif
@@ -115,7 +115,7 @@ class SERVER_EXPORT QgsServer
static QString &serverName();

// Status
static QString sConfigFilePath;
static QString* sConfigFilePath;
static QgsCapabilitiesCache* sCapabilitiesCache;
static QgsMapRenderer* sMapRenderer;
#ifdef HAVE_SERVER_PYTHON_PLUGINS

0 comments on commit 689cbad

Please sign in to comment.
You can’t perform that action at this time.