MCPcopy Create free account
hub / github.com/MapServer/MapServer / msMSSQL2008LayerClose

Function msMSSQL2008LayerClose

mapmssql2008.c:723–790  ·  view source on GitHub ↗

Close the MSSQL2008 record set and connection */

Source from the content-addressed store, hash-verified

721
722/* Close the MSSQL2008 record set and connection */
723int msMSSQL2008LayerClose(layerObj *layer)
724{
725 msMSSQL2008LayerInfo *layerinfo;
726
727 layerinfo = getMSSQL2008LayerInfo(layer);
728
729 if(layer->debug)
730 {
731 char *data = "";
732
733 if (layer->data)
734 {
735 data = layer->data;
736 }
737
738 msDebug("msMSSQL2008LayerClose datastatement: %s\n", data);
739 }
740
741 if(layer->debug && !layerinfo) {
742 msDebug("msMSSQL2008LayerClose -- layerinfo is NULL\n");
743 }
744
745 if(layerinfo) {
746 msConnPoolRelease(layer, layerinfo->conn);
747
748 layerinfo->conn = NULL;
749
750 if(layerinfo->user_srid) {
751 msFree(layerinfo->user_srid);
752 layerinfo->user_srid = NULL;
753 }
754
755 if(layerinfo->urid_name) {
756 msFree(layerinfo->urid_name);
757 layerinfo->urid_name = NULL;
758 }
759
760 if(layerinfo->index_name) {
761 msFree(layerinfo->index_name);
762 layerinfo->index_name = NULL;
763 }
764
765 if(layerinfo->sql) {
766 msFree(layerinfo->sql);
767 layerinfo->sql = NULL;
768 }
769
770 if(layerinfo->geom_column) {
771 msFree(layerinfo->geom_column);
772 layerinfo->geom_column = NULL;
773 }
774
775 if(layerinfo->geom_column_type) {
776 msFree(layerinfo->geom_column_type);
777 layerinfo->geom_column_type = NULL;
778 }
779
780 if(layerinfo->geom_table) {

Callers

nothing calls this directly

Calls 6

getMSSQL2008LayerInfoFunction · 0.85
msDebugFunction · 0.85
msConnPoolReleaseFunction · 0.85
msFreeFunction · 0.85
setMSSQL2008LayerInfoFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected