From 4633426c1b666ee82f6a5e663952d3370a5b572b Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 24 Jun 2004 17:44:13 +0000 Subject: If we fail to lock the folder, close the lockfd and reset it to -1. Fixes 2004-06-24 Jeffrey Stedfast * providers/local/camel-spool-folder.c (spool_lock): If we fail to lock the folder, close the lockfd and reset it to -1. Fixes bug #54680. svn path=/trunk/; revision=26499 --- camel/ChangeLog | 6 ++++++ camel/providers/local/camel-spool-folder.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 675892f47e..cc0c9c3cef 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2004-06-24 Jeffrey Stedfast + + * providers/local/camel-spool-folder.c (spool_lock): If we fail to + lock the folder, close the lockfd and reset it to -1. Fixes bug + #54680. + 2004-06-23 Jeffrey Stedfast * providers/imap4/camel-imap4-store.c (imap4_get_folder_info): diff --git a/camel/providers/local/camel-spool-folder.c b/camel/providers/local/camel-spool-folder.c index 4c4a49fbf9..a1b1901142 100644 --- a/camel/providers/local/camel-spool-folder.c +++ b/camel/providers/local/camel-spool-folder.c @@ -166,7 +166,10 @@ spool_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex) } retry++; } - + + close (mf->lockfd); + mf->lockfd = -1; + return -1; } -- cgit v1.2.3