X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Freporter.c;h=3b0410b7d3fbb7281f07d5b372491e079e2379f5;hb=96f35b20267e8b1a1c846d476f27fcd330e0b018;hp=1b2a8c2e6d35a189f7b2e55a9875ce230e8803e0;hpb=d74dc4d908fcbc1a4ef474edaf51e61ec90eab6b;p=debian%2Famanda diff --git a/server-src/reporter.c b/server-src/reporter.c index 1b2a8c2..3b0410b 100644 --- a/server-src/reporter.c +++ b/server-src/reporter.c @@ -2140,6 +2140,8 @@ handle_chunk( amfree(label); return NULL; } + /* set tapefcount, it is increased below */ + tapefcount = fileno - 1; skip_integer(s, ch); skip_whitespace(s, ch); if(ch == '\0') { @@ -2259,8 +2261,9 @@ handle_chunk( if(current_tape == NULL) { error("current_tape == NULL"); } + ++tapefcount; if (sp->filenum == 0) { - sp->filenum = ++tapefcount; + sp->filenum = tapefcount; sp->tapelabel = current_tape->label; } tapechunks[level] +=1; @@ -2497,8 +2500,10 @@ handle_success( /*NOTREACHED*/ } stats[i].taper_time += sec; - sp->filenum = ++tapefcount; - sp->tapelabel = current_tape->label; + if (sp->filenum == 0) { + sp->filenum = ++tapefcount; + sp->tapelabel = current_tape->label; + } sp->totpart = totpart; tapedisks[level] +=1; stats[i].tapedisks +=1;