* msOGRLayerClose() **********************************************************************/
| 2320 | * msOGRLayerClose() |
| 2321 | **********************************************************************/ |
| 2322 | int msOGRLayerClose(layerObj *layer) |
| 2323 | { |
| 2324 | #ifdef USE_OGR |
| 2325 | msOGRFileInfo *psInfo =(msOGRFileInfo*)layer->layerinfo; |
| 2326 | |
| 2327 | if (psInfo) |
| 2328 | { |
| 2329 | if( layer->debug ) |
| 2330 | msDebug("msOGRLayerClose(%s).\n", layer->connection); |
| 2331 | |
| 2332 | msOGRFileClose( layer, psInfo ); |
| 2333 | layer->layerinfo = NULL; |
| 2334 | } |
| 2335 | |
| 2336 | return MS_SUCCESS; |
| 2337 | |
| 2338 | #else |
| 2339 | /* ------------------------------------------------------------------ |
| 2340 | * OGR Support not included... |
| 2341 | * ------------------------------------------------------------------ */ |
| 2342 | |
| 2343 | msSetError(MS_MISCERR, "OGR support is not available.", "msOGRLayerClose()"); |
| 2344 | return(MS_FAILURE); |
| 2345 | |
| 2346 | #endif /* USE_OGR */ |
| 2347 | } |
| 2348 | |
| 2349 | /********************************************************************** |
| 2350 | * msOGRLayerIsOpen() |
no test coverage detected