I have a problem with store files code.

There's one situation that for some reason store.lock does not exists, but
store.lock.bak exists.
. When starting kannel, in store_load() (bb_store.c), the .bak is selected
and read. Then it calls
do_dump() to re-save messages in store file.
. do_dump() creates a store.new with new list and then calls rename_store().
. rename_store() tries to rename store.lock to store.lock.bak, but as there
is no store.lock, kannel
panics.

As in the next line store.lock.new is renamed to store.lock and later, on a
next do_dump() kannel will
again create the .bak.

Can I check for store.lock existence and if it does not exists, I don't even
try to rename
store.lock to store.lock.bak. Is it OK ?



Reply via email to