summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2007-12-30 01:53:28 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2007-12-30 01:53:28 +0000
commit7c69d7de2df4b0e74dce06f0f66372845339103d (patch)
tree60852202d662d542ee7f22728c2d62fc14a8fc67 /client
parentmove get_response() code into send_command() since nothing else uses it (diff)
downloadscire-7c69d7de2df4b0e74dce06f0f66372845339103d.tar.gz
scire-7c69d7de2df4b0e74dce06f0f66372845339103d.tar.bz2
scire-7c69d7de2df4b0e74dce06f0f66372845339103d.zip
implement parse_response()
svn path=/branches/new-fu/; revision=271
Diffstat (limited to 'client')
-rwxr-xr-xclient/scireclient.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/scireclient.pl b/client/scireclient.pl
index 6b4ec1a..8b5ff0c 100755
--- a/client/scireclient.pl
+++ b/client/scireclient.pl
@@ -44,8 +44,7 @@ sub run_main {
}
#3. Scan the jobs directory. If there are done/failed jobs, report them. Note jobs in running or queue.
- my @existing_jobs;
- @existing_jobs = scan_jobs_dir();
+ my @existing_jobs = scan_jobs_dir();
#4. Fetch the jobs list
get_jobs(@existing_jobs);
#5. ?
@@ -112,8 +111,10 @@ sub send_command {
#}
sub parse_response {
- my $resp = shift;
- return "Not sure how this is gonna work yet";
+ my $response = shift;
+ $response =~ /^(OK|ERROR)(?: (.+))?$/;
+ my ($status, $message) = ($1, $2);
+ return ($status, $message);
}
sub create_connection {