X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=submit%2FMO%2FSubmit.pm;h=4497eef41ea391637633141bc167cfcc2c473f07;hb=8b3af4ea3647832046e7f140c78181986429aea9;hp=15e6d7c3584030291c0123b4d23045ac13a9ee64;hpb=65ff89923436ec785ce2b35d26827aa95ce8c3ce;p=eval.git diff --git a/submit/MO/Submit.pm b/submit/MO/Submit.pm index 15e6d7c..4497eef 100644 --- a/submit/MO/Submit.pm +++ b/submit/MO/Submit.pm @@ -9,6 +9,7 @@ use warnings; use IO::Socket::INET; use IO::Socket::SSL; # qw(debug3); use Sherlock::Object; +use POSIX; sub new($) { my $user = $ENV{"USER"} or die "Environment variable USER not set\n"; @@ -17,11 +18,15 @@ sub new($) { my $root = $ENV{"MO_ROOT"} or die "Environment variable MO_ROOT not set\n"; my $self = { "Contest" => "CPSPC 2007", - "Server" => "localhost:8888", - "Key" => "$mo/key.pem", + "Server" => "kamzice.ms.mff.cuni.cz:8888", + "Key" => "$mo/key.pem", # Keys and certificates "Cert" => "$mo/cert.pem", "CACert" => "$mo/ca-cert.pem", "Trace" => defined $ENV{"MO_SUBMIT_TRACE"}, + "Checks" => 1, +# "History" => "$home/.history", # Keep submission history in this directory + "RefreshTimer" => 60000, # How often GUI sends STATUS commands [ms] + "root" => $root, "user" => $user, "sk" => undef, "error" => undef, @@ -159,4 +164,11 @@ sub send_file($$$) { return $self->reply; } +sub local_submit($$$$$) { + my ($self, $task, $part, $ext, $filename) = @_; + my $hist = $self->{"History"}; + -d $hist or mkdir $hist or return "Unable to create $hist: $!"; + ### FIXME: Unfinished +} + 1;