Browse Source

r.li.daemon: do not silently remove the first area

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49887 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 years ago
parent
commit
0986b21beb
1 changed files with 26 additions and 28 deletions
  1. 26 28
      raster/r.li/r.li.daemon/daemon.c

+ 26 - 28
raster/r.li/r.li.daemon/daemon.c

@@ -128,38 +128,36 @@ int calculateIndex(char *file, int f(int, char **, struct area_entry *, double *
     /*#######################################################
        ------------------analysis loop----------------------
        ####################################################### */
-    /*first job scheduling */
-    if (next_Area(parsed, l, g, &m) != 0)
-
-	/*body */
-	while (next_Area(parsed, l, g, &m) != 0) {
-	    worker_process(&doneJob, &m);
-
-	    /*perc++; */
-	    /*G_percent (perc, WORKERS, 1); */
-	    if (doneJob.type == DONE) {
-		double result;
-
-		result = doneJob.f.f_d.res;
-		/*output */
-		if (parsed != MVWIN) {
-		    print_Output(res, doneJob);
-		}
-		else {
-		    /*raster output */
-		    raster_Output(random_access, doneJob.f.f_d.aid, g,
-				  doneJob.f.f_d.res);
-		}
+
+    /*body */
+    while (next_Area(parsed, l, g, &m) != 0) {
+	worker_process(&doneJob, &m);
+
+	/*perc++; */
+	/*G_percent (perc, WORKERS, 1); */
+	if (doneJob.type == DONE) {
+	    double result;
+
+	    result = doneJob.f.f_d.res;
+	    /*output */
+	    if (parsed != MVWIN) {
+		print_Output(res, doneJob);
 	    }
 	    else {
-		if (parsed != MVWIN) {
-		    error_Output(res, doneJob);
-		}
-		else {
-		    /*printf("todo ");fflush(stdout); *//* TODO scrivere su raster NULL ??? */
-		}
+		/*raster output */
+		raster_Output(random_access, doneJob.f.f_d.aid, g,
+			      doneJob.f.f_d.res);
 	    }
 	}
+	else {
+	    if (parsed != MVWIN) {
+		error_Output(res, doneJob);
+	    }
+	    else {
+		/*printf("todo ");fflush(stdout); *//* TODO scrivere su raster NULL ??? */
+	    }
+	}
+    }
 
     worker_end();