[wiaflos-devel] COMMIT - r268 - in trunk: soap/Plugins wiaflos/server

svn at linuxrulz.org svn at linuxrulz.org
Tue Dec 30 06:47:06 GMT 2008


Author: nkukard
Date: 2008-12-30 06:47:06 +0000 (Tue, 30 Dec 2008)
New Revision: 268

Modified:
   trunk/soap/Plugins/Reporting.pm
   trunk/wiaflos/server/Reporting.pm
Log:
* Added missing background options


Modified: trunk/soap/Plugins/Reporting.pm
===================================================================
--- trunk/soap/Plugins/Reporting.pm	2008-12-30 06:26:35 UTC (rev 267)
+++ trunk/soap/Plugins/Reporting.pm	2008-12-30 06:47:06 UTC (rev 268)
@@ -114,6 +114,7 @@
 #		StartDate	- Start date
 #		EndDate		- End date
 #		Subject		- Statement subject
+#		Background	- Background this report generation
 sub sendReport {
 	my (undef,$data) = @_;
 
@@ -135,6 +136,7 @@
 	$detail->{'StartDate'} = $data->{'StartDate'};
 	$detail->{'EndDate'} = $data->{'EndDate'};
 	$detail->{'Subject'} = $data->{'Subject'};
+	$detail->{'Background'} = $data->{'Background'};
 	my $res = wiaflos::server::Reporting::sendReport($detail);
 
 	if ($res < 0) {

Modified: trunk/wiaflos/server/Reporting.pm
===================================================================
--- trunk/wiaflos/server/Reporting.pm	2008-12-30 06:26:35 UTC (rev 267)
+++ trunk/wiaflos/server/Reporting.pm	2008-12-30 06:47:06 UTC (rev 268)
@@ -744,8 +744,6 @@
 		return ERR_PARAM;
 	}
 
-	my $background = $detail->{'Background'};
-
 	# Pull in config
 	my $config = wiaflos::server::config::getConfig();
 
@@ -783,7 +781,8 @@
 
 	};
 
-	# Check if we must background this...
+	# Should this be backgrounded?
+	my $background = $detail->{'Background'};
 	if ($background) {
 		my $job = wiaflos::server::jobs::createJob();
 		if ($job < RES_OK) {
@@ -937,8 +936,12 @@
 
 	wiaflos::server::jobs::setStatus("Done");
 
-#	return RES_OK;
-	exit 0;
+	# Check how we going to exit
+	if ($background) {
+		exit 0;
+	} else {
+		return RES_OK;
+	}
 }
 
 



More information about the wiaflos-devel mailing list