X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=submit%2Fcommands.c;h=93d9ae9e52c836ca49d2e7a5d7479427c3fe28dd;hb=9306a593e097b30b55196f0fb7dd7c189389a0d3;hp=595db773dc7e4c4cb2eaf3494d90bc51e1925d26;hpb=a4e0b98c301697cf3a4664b31bee1dafd11511a9;p=eval.git diff --git a/submit/commands.c b/submit/commands.c index 595db77..93d9ae9 100644 --- a/submit/commands.c +++ b/submit/commands.c @@ -93,8 +93,9 @@ static void copy_attrs(struct odes *dest, struct odes *src) { for (struct oattr *a = src->attrs ; a; a=a->next) - for (struct oattr *aa = a; aa; aa=aa->same) - obj_add_attr(dest, aa->attr, aa->val); + if (a->attr < OBJ_ATTR_SON) + for (struct oattr *aa = a; aa; aa=aa->same) + obj_add_attr(dest, aa->attr, aa->val); } static void @@ -201,9 +202,6 @@ cmd_submit(struct conn *c) if (!fb) return; - // FIXME: Check contest time - // FIXME: Keep history of submitted tasks - task_lock_status(c); struct odes *tasko = task_status_find_task(c, task, 1); struct odes *parto = task_status_find_part(tasko, pname, 1); @@ -226,10 +224,9 @@ cmd_submit(struct conn *c) struct odes *vero = obj_add_son(parto, 'V' + OBJ_ATTR_SON); obj_set_attr_num(vero, 'V', ++last_ver); obj_set_attr_num(vero, 'T', time(NULL)); + obj_set_attr_num(vero, 'L', obj_find_anum(c->request, 'S', 0)); obj_set_attr(vero, 'S', "submitted"); obj_set_attr(vero, 'X', ext); - // FIXME: hash - // FIXME: remove old versions from the status file? task_submit_part(c->user, tname, pname, ext, last_ver, fb); obj_set_attr_num(parto, 'V', last_ver); task_unlock_status(c, 1);