[wiaflos-devel] COMMIT - r277 - trunk/soap

svn at linuxrulz.org svn at linuxrulz.org
Mon Feb 16 15:59:29 GMT 2009


Author: nkukard
Date: 2009-02-16 15:59:29 +0000 (Mon, 16 Feb 2009)
New Revision: 277

Modified:
   trunk/soap/wiaflos-server
Log:
* Fixed broken Config::IniFiles usage
* Added support for unix sockets


Modified: trunk/soap/wiaflos-server
===================================================================
--- trunk/soap/wiaflos-server	2009-02-16 15:58:10 UTC (rev 276)
+++ trunk/soap/wiaflos-server	2009-02-16 15:59:29 UTC (rev 277)
@@ -56,6 +56,9 @@
 	my $cmdline;
 
 
+	# We're being called by a module, ignore
+	return if (@_);
+
 	# Set defaults
 	$cfg->{'config_file'} = "/etc/wiaflos-server.conf";
 
@@ -82,8 +85,11 @@
 	}
 
 	# Set defaults
+	$server->{'proto'} = "tcp";
+	$server->{'host'} = "*";
 	$server->{'hostname'} = "localhost";
 	$server->{'port'} = 1080;
+	$server->{'timeout'} = 30;
 
 	# Check config file exists
 	if (! -f $cfg->{'config_file'}) {
@@ -98,13 +104,13 @@
 	) or die "Failed to open config file '".$cfg->{'config_file'}."': $!";
 	# Copy config
 	my %config = %inifile;
-	untie(%inifile);
+	#untie(%inifile); # This does not support a method to destroy the data, so we ignore for now
 
 	# Server config
 	my @server_params = (
 			'log_level','log_file',
 			'syslog_logsock', 'syslog_ident', 'syslog_logopt', 'syslog_facility',
-			'port', 'host', 'hostname',
+			'proto', 'port', 'host', 'hostname',
 			'allow', 'deny', 'cidr_allow', 'cidr_deny',
 			'pid_file', 
 			'user', 'group',
@@ -133,9 +139,8 @@
 		exit 1;
 	}
 	# Split off plugins
-	foreach my $plugin (@{$soap->{'plugins'}}) {
-		$plugin =~ s/\s+//g;
-	}
+	my @soap_plugins = split(/\s+/,$soap->{'plugins'});
+	$soap->{'plugins'} = \@soap_plugins;
 	# Set other stuff
 	$soap->{'on_action'} = \&Auth::checkAccess;
 



More information about the wiaflos-devel mailing list