From a28644640cab7a1827002d407fc2c593644943cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Filipovi=C4=8D?= Date: Tue, 3 Apr 2007 12:39:13 +0000 Subject: [PATCH] Fixed bug that damaged memory consistency. --- org.glite.jp.primary/src/attrs.c | 4 +++- org.glite.jp.primary/src/new_ftp_backend.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/org.glite.jp.primary/src/attrs.c b/org.glite.jp.primary/src/attrs.c index c8a24e2..89d4e16 100644 --- a/org.glite.jp.primary/src/attrs.c +++ b/org.glite.jp.primary/src/attrs.c @@ -75,10 +75,12 @@ static int merge_attrvals(glite_jp_attrval_t **out,int nout,const glite_jp_attrv void process_files(glite_jp_context_t ctx, const char *job, glite_jp_attrval_t** out, int* nout, const char* attr, const glite_jpps_fplug_data_t* plugin, const char* class, const char* uri){ void *ph, *beh; char** names = NULL; - int nnames = glite_jppsbe_get_names(ctx, job, class, &names); + int nnames; int n; glite_jp_error_t *keep_err = NULL; + nnames = glite_jppsbe_get_names(ctx, job, class, &names); + for (n = 0; n < nnames; n++) if (! glite_jppsbe_open_file(ctx,job,class, names[n], O_RDONLY, &beh)) { if (!plugin->ops.open(plugin->fpctx,beh,uri,&ph)) { diff --git a/org.glite.jp.primary/src/new_ftp_backend.c b/org.glite.jp.primary/src/new_ftp_backend.c index 88b26d4..8dd5421 100644 --- a/org.glite.jp.primary/src/new_ftp_backend.c +++ b/org.glite.jp.primary/src/new_ftp_backend.c @@ -2400,6 +2400,7 @@ int glite_jppsbe_read_tag( err.desc = "cannot read tag"; glite_jp_stack_error(ctx,&err); e = ctx->error; + ctx->error = NULL; glite_jppsbe_close_file(ctx,h->bhandle); ctx->error = e; return err.code; -- 1.8.2.3