[mapserver-commits] r13117 - trunk/mapserver/tinyows/src/ows

svn at osgeo.org svn at osgeo.org
Wed Feb 8 20:29:08 EST 2012


Author: colivier
Date: 2012-02-08 17:29:08 -0800 (Wed, 08 Feb 2012)
New Revision: 13117

Modified:
   trunk/mapserver/tinyows/src/ows/ows.c
Log:
--help entry added
ol | 2007-09-26 15:03:22 +0200 (Wed, 26 Sep 2007)

Modified: trunk/mapserver/tinyows/src/ows/ows.c
===================================================================
--- trunk/mapserver/tinyows/src/ows/ows.c	2012-02-09 01:29:01 UTC (rev 13116)
+++ trunk/mapserver/tinyows/src/ows/ows.c	2012-02-09 01:29:08 UTC (rev 13117)
@@ -129,6 +129,7 @@
 		ows_layer_list_flush(o->layers, output);
 		fprintf(output, "\n");
 	}
+
 	if (o->request != NULL)
 	{
 		fprintf(output, "request: ");
@@ -200,6 +201,20 @@
 }
 
 
+void ows_usage(ows * o) {
+    printf("TinyOWS should be called by CGI throw a Web Server !\n\n");
+    printf("___________\n");
+    printf("Config File Path: %s\n", OWS_CONFIG_FILE_PATH);
+    printf("PostGIS dsn: '%s'\n", o->pg_dsn->buf);
+    printf("___________\n");
+    printf("WFS 1.0.0 Basic Schema Path: %s\n", WFS_SCHEMA_100_BASIC_PATH);
+    printf("WFS 1.0.0 Transactional Schema Path: %s\n", 
+        WFS_SCHEMA_100_TRANS_PATH);
+    printf("WFS 1.1.0 Schema Path: %s\n", WFS_SCHEMA_110_PATH);
+    printf("___________\n");
+}
+
+
 int main(int argc, char *argv[])
 {
 	char *query;
@@ -240,7 +255,6 @@
 		/* Process service request */
 		o->request = ows_request_init();
 		ows_request_check(o, o->request, o->cgi, query);
-		/* ows_cache_try(o, o->request); */
 
 		/* Run the right OWS service */
 		switch (o->request->service)
@@ -259,7 +273,15 @@
 			ows_error(o, OWS_ERROR_INVALID_PARAMETER_VALUE,
 			   "service unknown", "service");
 		}
-	}
+	} else if (argc > 1 && (strncmp(argv[1], "--help", 6) == 0
+            || strncmp(argv[1], "--h", 3) == 0)) {
+		ows_parse_config(o, OWS_CONFIG_FILE_PATH);
+        ows_usage(o);
+    } else {
+			ows_error(o, OWS_ERROR_INVALID_PARAMETER_VALUE,
+			   "service unknown", "service");
+    }
+  
 	ows_free(o);
 
 	return EXIT_SUCCESS;



More information about the mapserver-commits mailing list