From 5224b5bc9fa4dbfa465a5e884b1d5f774502c7ba Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 11 Feb 2006 20:02:06 +0000 Subject: [PATCH] don't commit state file when a fatal error occurs --- src/sync.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sync.c b/src/sync.c index 36a981f..cb4fc91 100644 --- a/src/sync.c +++ b/src/sync.c @@ -1167,7 +1167,6 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan ) } } - finish: Fprintf( nfp, "%d:%d %d:%d:%d\n", muidval, maxuid[M], suidval, smaxxuid, maxuid[S] ); for (srec = recs; srec; srec = srec->next) { if (srec->status & S_DEAD) @@ -1199,5 +1198,10 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan ) free( jname ); free( dname ); return ret; + + finish: + Fclose( nfp ); + Fclose( jfp ); + goto bail; }