From: Martin Mares Date: Tue, 5 Jun 2007 11:38:26 +0000 (+0200) Subject: Remember length of submitted files. X-Git-Tag: python-dummy-working~397 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d2c47625c8b5e7392c95d63b7f1a13e492d053f7;p=moe.git Remember length of submitted files. --- diff --git a/submit/PROTOCOL b/submit/PROTOCOL index 30ae7a7..fcd1106 100644 --- a/submit/PROTOCOL +++ b/submit/PROTOCOL @@ -66,6 +66,7 @@ Task status objects Vid Tsubmit_time Sstatus + Lfilesize Hhash Xextension ) diff --git a/submit/commands.c b/submit/commands.c index 595db77..432e2de 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 @@ -226,6 +227,7 @@ 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