It's a mess. We're thinking of using the database sequence number as the cookie -- this should save this hassle.

Wasn't that sync number in config.ini intended to serve that purpose? The problem, of course, is to increment it when and only when database gets successfully changed.

Hence:

In future, it'll be properly transactioned, of course

But of course!

Dragi "Bonzi" Raos
Zagreb, Croatia
Q#5196, MkII#80000376, 18GB green
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue