Index: /trunk/pstamp/scripts/pstamp_parser_run.pl
===================================================================
--- /trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 21384)
+++ /trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 21385)
@@ -223,4 +223,5 @@
 $parse_cmd .= " --dbname $dbname" if $dbname;
 
+my $newState = "run";
 my $fault;
 {
@@ -248,4 +249,5 @@
     unless ($success) {
         $fault = $error_code >> 8;
+        $newState = "stop";
     }
 }
@@ -255,5 +257,5 @@
 #
 {
-    my $command = "$pstamptool -updatereq -req_id $req_id -state run";
+    my $command = "$pstamptool -updatereq -req_id $req_id -state $newState";
     $command   .= " -reqType $reqType" if $reqType;
     $command   .= " -uri $new_uri" if $new_uri;
