Index: trunk/pstamp/scripts/pstamp_parser_run.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 28223)
+++ trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 28224)
@@ -198,5 +198,5 @@
 $parse_cmd .= " --verbose" if $verbose;
 
-my $newState = "run";
+my $newState;
 my $fault;
 {
@@ -224,7 +224,8 @@
     }
 
-    unless ($success) {
+    if ($success) {
+        $newState = 'run';
+    } else {
         $fault = $error_code >> 8;
-#        $newState = "stop";
     }
 }
@@ -234,5 +235,6 @@
 #
 {
-    my $command = "$pstamptool -updatereq -req_id $req_id -set_state $newState";
+    my $command = "$pstamptool -updatereq -req_id $req_id";
+    $command   .= " -set_state $newState" if $newState;
     $command   .= " -set_outdir $outdir";
     $command   .= " -set_reqType $reqType" if $reqType;
