]> mj.ucw.cz Git - moe.git/commitdiff
Remember length of submitted files.
authorMartin Mares <mj@ucw.cz>
Tue, 5 Jun 2007 11:38:26 +0000 (13:38 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 5 Jun 2007 11:38:26 +0000 (13:38 +0200)
submit/PROTOCOL
submit/commands.c

index 30ae7a73806368c7784c453dbcc9e730948ab773..fcd1106b8c6296ecab93c60bff0b54043d041f41 100644 (file)
@@ -66,6 +66,7 @@ Task status objects
                        Vid
                        Tsubmit_time
                        Sstatus
+                       Lfilesize
                        Hhash
                        Xextension
                )
index 595db773dc7e4c4cb2eaf3494d90bc51e1925d26..432e2deb2dd0dd3fbbfacb77c0570d76d9b47f62 100644 (file)
@@ -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