deprecated forwarding register to SEARCH_REGISTRARS

This commit is contained in:
Olivier van Helden
2025-01-08 11:14:59 -04:00
parent 1e3d0cca8b
commit 11a9937e6a
2 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -59,9 +59,9 @@ define( 'SEARCH_DB_USER', OPENSIM_DB_USER );
define( 'SEARCH_DB_PASS', OPENSIM_DB_PASS );
/**
* Other registrars to forward hosts registrations.
* Other registrars to forward hosts registrations (deprecated)
*
* This method is not needed as with current OpenSim server (0.9.x) which allow
* This method is not needed since OpenSim server (0.9.x) which allow
* specifying multiple registrars, but could be used in the future to implement
* peer to peer information sharing.
*
+15 -6
View File
@@ -78,10 +78,19 @@ switch ( $service ) {
break;
}
if ( is_array( SEARCH_REGISTRARS ) & ! empty( $hostname ) & ! empty( $port ) & ! empty( $service ) ) {
$querystring = getenv( 'QUERY_STRING' );
foreach ( SEARCH_REGISTRARS as $registrar ) {
$result = file_get_contents( "$registrar?$querystring" );
}
}
/**
* Deprecated since 0.9.0. Multiple registrars can be set directly from OpenSim config.
* This would create duplicate registration requests, and worst, an infinite loop
* if this service url is included in the array.
*
* Could be re-enabled with a specific option like FORWARD_TO_REGISTRARS, but only
* with a strict test to ensure we don't call ourselves again and no registrar is
* called both from robust and this script.
*/
// if ( is_array( SEARCH_REGISTRARS ) & ! empty( $hostname ) & ! empty( $port ) & ! empty( $service ) ) {
// $querystring = getenv( 'QUERY_STRING' );
// foreach ( SEARCH_REGISTRARS as $registrar ) {
// $result = file_get_contents( "$registrar?$querystring" );
// }
// }
die;