]> git.pond.sub.org Git - empserver/commitdiff
Fix struct loststr / struct empobj mismatch corrupting lostitems hvy-metal-2.12
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 1 Aug 2008 12:50:24 +0000 (08:50 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 1 Aug 2008 12:59:36 +0000 (08:59 -0400)
The initial parts of struct loststr and struct empobj must match.
Commit 49780e2c screwed that up for members lost_uid/uid, which also
broke the equivalence of lost_owner/own.  Since lost_uid is not used,
the former had no effect.  But the latter broke xdvisible().  Could
make xdump lost leak information.

Commit a680c811 reorderd struct loststr members to make lost_timestamp
equivalent to new struct empobj member timestamp, but failed due to
the bug in commit 49780e2c.  Commit f33b96b1 then set the timestamp
through empobj, which screwed up timestamps in lostitems, i.e. it
broke incremental xdump lost.

All of the above is in v4.3.12.

Commit 536ef0b0 (v4.3.15) added lost_seqno / seqno.  No effect,
because only seqno is used.
(cherry picked from commit eb252201b69a591523e8a68b41c01f4a80e7b731)

include/lost.h

index 1bb930796338f5c403b3564c00b149ac981eebb7..a662463798aeddec11176919d3c1e9cde048f9ce 100644 (file)
@@ -40,7 +40,7 @@
 struct loststr {
     /* initial part must match struct empobj */
     short ef_type;
-    int lost_uid;
+    short lost_uid;
     unsigned lost_seqno;
     time_t lost_timestamp;     /* When it was lost */
     natid lost_owner;          /* Who lost it */