Skip to content

Commit

Permalink
[bugfix][server] Fixes #13291
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Feb 24, 2016
1 parent 1af724f commit 689cbad
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 689cbad

Please sign in to comment.