mapserver.diff
| src/mapserver/qgsconfigcache.cpp (working copy) | ||
|---|---|---|
| 73 | 73 |
QFile* configFile = new QFile( filePath ); |
| 74 | 74 |
if ( !configFile->exists() || !configFile->open( QIODevice::ReadOnly ) ) |
| 75 | 75 |
{
|
| 76 |
QgsMSDebugMsg( "File unreadable: " + filePath ); |
|
| 76 | 77 |
delete configFile; |
| 77 | 78 |
return 0; |
| 78 | 79 |
} |
| 79 | 80 | |
| 80 | 81 |
//then create xml document |
| 81 | 82 |
QDomDocument* configDoc = new QDomDocument(); |
| 82 |
if ( !configDoc->setContent( configFile, true ) ) |
|
| 83 |
QString errorMsg; |
|
| 84 |
int line, column; |
|
| 85 |
if ( !configDoc->setContent( configFile, true, &errorMsg, &line, &column ) ) |
|
| 83 | 86 |
{
|
| 87 |
QgsMSDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " ) |
|
| 88 |
.arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) ); |
|
| 84 | 89 |
delete configFile; |
| 85 | 90 |
delete configDoc; |
| 86 | 91 |
return 0; |
| ... | ... | |
| 99 | 104 |
} |
| 100 | 105 |
else |
| 101 | 106 |
{
|
| 107 |
QgsMSDebugMsg( "SLD or qgis expected in " + filePath ); |
|
| 102 | 108 |
delete configDoc; |
| 103 | 109 |
return 0; |
| 104 | 110 |
} |
| src/mapserver/qgis_map_serv.cpp (working copy) | ||
|---|---|---|
| 126 | 126 |
return QFileInfo( "admin.sld" ); |
| 127 | 127 |
} |
| 128 | 128 | |
| 129 |
int fcgi_accept() |
|
| 130 |
{
|
|
| 131 |
#ifdef Q_OS_WIN |
|
| 132 |
if ( FCGX_IsCGI() ) |
|
| 133 |
return FCGI_Accept(); |
|
| 134 |
else |
|
| 135 |
return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ ); |
|
| 136 |
#else |
|
| 137 |
return FCGI_Accept(); |
|
| 138 |
#endif |
|
| 139 |
} |
|
| 129 | 140 | |
| 130 | ||
| 131 | 141 |
int main( int argc, char * argv[] ) |
| 132 | 142 |
{
|
| 133 | 143 |
#ifndef _MSC_VER |
| ... | ... | |
| 181 | 191 |
} |
| 182 | 192 |
} |
| 183 | 193 | |
| 184 | ||
| 185 | 194 |
//creating QgsMapRenderer is expensive (access to srs.db), so we do it here before the fcgi loop |
| 186 | 195 |
QgsMapRenderer* theMapRenderer = new QgsMapRenderer(); |
| 187 | 196 | |
| 188 |
while ( FCGI_Accept() >= 0 )
|
|
| 197 |
while ( fcgi_accept() >= 0 )
|
|
| 189 | 198 |
{
|
| 190 | 199 |
printRequestInfos(); //print request infos if in debug mode |
| 191 | 200 | |
| src/mapserver/qgsmapserverlogger.cpp (working copy) | ||
|---|---|---|
| 57 | 57 |
if ( !mLogFile.isOpen() ) |
| 58 | 58 |
{
|
| 59 | 59 |
#ifdef _MSC_VER |
| 60 |
::OutputDebugString( message.toLocal8Bit() ); |
|
| 60 |
::OutputDebugString( message .toLocal8Bit() ); |
|
| 61 |
::OutputDebugString( "\n" ); |
|
| 61 | 62 |
#endif |
| 62 | 63 |
return; |
| 63 | 64 |
} |