Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2836 from elpaso/bugfix-13291
[bugfix][server] Fixes #13291
  • Loading branch information
elpaso committed Feb 25, 2016
2 parents 31c788d + 689cbad commit b0269be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/server/qgsserver.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgsserver.h
Expand Up @@ -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
Expand Down

0 comments on commit b0269be

Please sign in to comment.