X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=server-src%2Freporter.c;h=3b0410b7d3fbb7281f07d5b372491e079e2379f5;hb=f86ca883daf8a5123c8cac43bfd76d514c5b1c82;hp=f9fabea9535f5ed26d7096d5e198bd1219454e6d;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/server-src/reporter.c b/server-src/reporter.c index f9fabea..3b0410b 100644 --- a/server-src/reporter.c +++ b/server-src/reporter.c @@ -1975,7 +1975,7 @@ handle_note(void) BSTRNCMP(curstr, "Taper protocol error") == 0) { exit_status |= STATUS_TAPE; } - pidstr = index(curstr,' '); + pidstr = strchr(curstr,' '); if (pidstr) { pidstr++; } @@ -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; @@ -2405,7 +2408,7 @@ handle_success( origkb = 0.1; } if (curprog == P_TAPER && logtype == L_PARTIAL) { - char *t = index(s-1,']'); + char *t = strchr(s-1,']'); if (t) { char *errmsg, *u; errmsg = unquote_string(t+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;