From ed267e8d7b67125e1af58fef8afe1b17a8464e2c Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 2 Oct 2015 09:00:40 +0200 Subject: [PATCH] Do not access to the cash table if we are outside of the lock system --- src/SERVER/ncfileop.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/SERVER/ncfileop.c b/src/SERVER/ncfileop.c index 468b3e8..25b3763 100755 --- a/src/SERVER/ncfileop.c +++ b/src/SERVER/ncfileop.c @@ -37,16 +37,14 @@ int CloseOldFile(DD_Var_t *D) if(D->Maxnc_rec > 0) { status = nc_close(D->ncID); - char name[MAXFILENAME]; - strcpy(name,D->Cash.names[D->CurrCushN]); Cache_ReleaseDataFileAccess(D); if(status < 0) { D->LastFileStatus = DATAFILEERR; - if(Verbose) fprintf(stderr,"CloseOldFile: file %s, error while closed, message : \n", name, nc_strerror(status)); + if(Verbose) fprintf(stderr,"CloseOldFile: error while closed, message : \n", nc_strerror(status)); return DATAFILEERR; } - if(Verbose) fprintf(stderr,"CloseOldFile: file %s closed\n", name); + if(Verbose) fprintf(stderr,"CloseOldFile: file closed\n"); D->Maxnc_rec = 0; } else if(Verbose) fprintf(stderr,"CloseOldFile: Nothing To close\n"); -- libgit2 0.21.2