[Opensrf-commits] r1567 - in trunk: examples src/gateway

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Dec 30 14:22:11 EST 2008


Author: erickson
Date: 2008-12-30 14:22:07 -0500 (Tue, 30 Dec 2008)
New Revision: 1567

Modified:
   trunk/examples/opensrf_core.xml.example
   trunk/src/gateway/osrf_json_gateway.c
Log:
multidomain is required.  no use for a static list of allowed services.  removed support

Modified: trunk/examples/opensrf_core.xml.example
===================================================================
--- trunk/examples/opensrf_core.xml.example	2008-12-23 16:21:20 UTC (rev 1566)
+++ trunk/examples/opensrf_core.xml.example	2008-12-30 19:22:07 UTC (rev 1567)
@@ -86,18 +86,7 @@
     <!--  the routers's name on the network -->
     <router_name>router</router_name>
 
-    <!--
-    These are the services that the gateway will serve. 
-    Any other requests will receive an HTTP_NOT_FOUND (404) 
-    DO NOT put any services here that you don't want the internet to have access to
-    This section will be soon deprecated for multi-domain mode... 
-    -->
-    <services>
-      <service>opensrf.math</service>
-    </services>
-
     <!-- jabber login info -->
-
     <!-- The gateway connects to the public domain -->
     <domain>public.localhost</domain>
     <username>opensrf</username>

Modified: trunk/src/gateway/osrf_json_gateway.c
===================================================================
--- trunk/src/gateway/osrf_json_gateway.c	2008-12-23 16:21:20 UTC (rev 1566)
+++ trunk/src/gateway/osrf_json_gateway.c	2008-12-30 19:22:07 UTC (rev 1567)
@@ -29,7 +29,6 @@
 char* osrf_json_gateway_config_file = NULL;
 int bootstrapped = 0;
 int numserved = 0;
-osrfStringArray* allowedServices = NULL;
 
 static const char* osrf_json_gateway_set_default_locale(cmd_parms *parms, void *config, const char *arg) {
 	if (arg)
@@ -87,16 +86,8 @@
 	}
 
 	bootstrapped = 1;
-	allowedServices = osrfNewStringArray(8);
 	osrfLogInfo(OSRF_LOG_MARK, "Bootstrapping gateway child for requests");
-	osrfConfigGetValueList( NULL, allowedServices, "/services/service" );
 
-	int i;
-	for( i = 0; i < allowedServices->size; i++ ) {
-		ap_log_error( APLOG_MARK, APLOG_DEBUG, 0, s, 
-			"allowed service: %s\n", osrfStringArrayGetString(allowedServices, i));
-	}
-
     // when this pool is cleaned up, it means the child 
     // process is going away.  register some cleanup code
     // XXX causes us to disconnect even for clone()'d process cleanup (as in mod_cgi)
@@ -223,8 +214,7 @@
 	/* ----------------------------------------------------------------- */
 
 
-	if(!(service && method) || 
-		!osrfStringArrayContains(allowedServices, service)) {
+	if(!(service && method)) {
 
 		osrfLogError(OSRF_LOG_MARK, 
 			"Service [%s] not found or not allowed", service);



More information about the opensrf-commits mailing list