-------------------------------------------------------------------- */ msSDELayerClose */ -------------------------------------------------------------------- */ Closes the MapServer layer. This doesn't necessarily close the */ connection to the layer. */ ------------------------------------------------
| 1388 | /* connection to the layer. */ |
| 1389 | /* -------------------------------------------------------------------- */ |
| 1390 | int msSDELayerClose(layerObj *layer) { |
| 1391 | #ifdef USE_SDE |
| 1392 | msSDELayerInfo *sde=NULL; |
| 1393 | sde = layer->layerinfo; |
| 1394 | |
| 1395 | /* Silently return if layer not opened. */ |
| 1396 | if (!msSDELayerIsOpen(layer)) return MS_SUCCESS; |
| 1397 | |
| 1398 | if(layer->debug) |
| 1399 | msDebug("msSDELayerClose(): Closing layer %s.\n", layer->name); |
| 1400 | |
| 1401 | if (sde->layerinfo) SE_layerinfo_free(sde->layerinfo); |
| 1402 | if (sde->coordref) SE_coordref_free(sde->coordref); |
| 1403 | if (sde->table) msFree(sde->table); |
| 1404 | if (sde->column) msFree(sde->column); |
| 1405 | if (sde->row_id_column) msFree(sde->row_id_column); |
| 1406 | if (sde->join_table) msFree(sde->join_table); |
| 1407 | if (sde->extent) msFree(sde->extent); |
| 1408 | if (sde->nBaseColumns) msFree(sde->nBaseColumns); |
| 1409 | if (sde->nJoinColumns) msFree(sde->nJoinColumns); |
| 1410 | |
| 1411 | msConnPoolRelease( layer, sde->connPoolInfo ); |
| 1412 | if (layer->layerinfo) msFree(layer->layerinfo); |
| 1413 | layer->layerinfo = NULL; |
| 1414 | return MS_SUCCESS; |
| 1415 | |
| 1416 | #else |
| 1417 | msSetError( MS_MISCERR, "SDE support is not available.", "msSDELayerClose()"); |
| 1418 | return(MS_FALSE); |
| 1419 | #endif |
| 1420 | } |
| 1421 | |
| 1422 | |
| 1423 | /* -------------------------------------------------------------------- */ |
nothing calls this directly
no test coverage detected