[mapserver-commits] r7622 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue May 27 10:50:46 EDT 2008
Author: pramsey
Date: 2008-05-27 10:50:45 -0400 (Tue, 27 May 2008)
New Revision: 7622
Modified:
trunk/mapserver/mappostgis.c
trunk/mapserver/maptile.c
Log:
Fix Win32 build.
Modified: trunk/mapserver/mappostgis.c
===================================================================
--- trunk/mapserver/mappostgis.c 2008-05-26 19:01:24 UTC (rev 7621)
+++ trunk/mapserver/mappostgis.c 2008-05-27 14:50:45 UTC (rev 7622)
@@ -171,6 +171,7 @@
int msPOSTGISSanitizeConnection(PGconn *conn)
{
int conn_bad = 0;
+ PGTransactionStatusType trans_status;
if (PQstatus(conn) == CONNECTION_BAD)
{
@@ -205,7 +206,7 @@
return MS_FAILURE;
}
- const PGTransactionStatusType trans_status = PQtransactionStatus(conn);
+ trans_status = PQtransactionStatus(conn);
if (trans_status == PQTRANS_INTRANS || trans_status == PQTRANS_INERROR) /* idle, in a transaction block or a failed transaction block */
{
PGresult *rb_res = PQexec(conn, "ROLLBACK");
@@ -677,7 +678,8 @@
int msPOSTGISLayerClose(layerObj *layer)
{
msPOSTGISLayerInfo *layerinfo;
-
+ PGresult *rollb_res;
+
layerinfo = getPostGISLayerInfo(layer);
if(layer->debug) {
@@ -718,7 +720,7 @@
layerinfo->cursor_name[0] = '\0';
- PGresult *rollb_res = PQexec(layerinfo->conn, "ROLLBACK");
+ rollb_res = PQexec(layerinfo->conn, "ROLLBACK");
if (!rollb_res || PQresultStatus(rollb_res) != PGRES_COMMAND_OK) {
msSetError(MS_QUERYERR, "Error executing PostgreSQL ROLLBACK statement: %s", "msPOSTGISLayerClose()", PQerrorMessage(layerinfo->conn));
@@ -1175,10 +1177,10 @@
size_t length;
char *temp;
- PGresult *query_result, *beg_res, *rollb_res;
+ PGresult *query_result, *beg_res, *rollb_res, *close_res;
msPOSTGISLayerInfo *layerinfo;
char *wkb;
- int result, t, size;
+ int result, t, size, num_tuples;
char *temp1, *temp2;
if(layer->debug) {
@@ -1292,7 +1294,7 @@
/* query has been done, so we can retreive the results */
shape->type = MS_SHAPE_NULL;
- const int num_tuples = PQntuples(query_result);
+ num_tuples = PQntuples(query_result);
if(0 < num_tuples) {
/* only need to get one shape */
/* retreive an item */
@@ -1352,7 +1354,7 @@
PQclear(query_result);
- PGresult *close_res = PQexec(layerinfo->conn, "CLOSE mycursor2");
+ close_res = PQexec(layerinfo->conn, "CLOSE mycursor2");
if (!close_res || PQresultStatus(close_res) != PGRES_COMMAND_OK)
{
msSetError(MS_QUERYERR, "Error executing PostgreSQL CLOSE statement.", "msPOSTGISLayerGetShape()");
Modified: trunk/mapserver/maptile.c
===================================================================
--- trunk/mapserver/maptile.c 2008-05-26 19:01:24 UTC (rev 7621)
+++ trunk/mapserver/maptile.c 2008-05-27 14:50:45 UTC (rev 7622)
@@ -124,7 +124,8 @@
/************************************************************************
* msTileSetExtent *
* *
- * Called from setExtent() in maptemplate.c. *
+ * Based on the input parameters, set the output extent for this *
+ * tile. *
************************************************************************/
int msTileSetExtent(mapservObj* msObj) {
#ifdef USE_TILE_API
More information about the mapserver-commits
mailing list