[MAJOR] session: don't clear buffer status flags anymore

We want to be able to keep information about errors and timeouts
as long as possible in the buffer. Let's not clear these flags
anymore and keep them static. This does not seem to cause any
trouble, though a finer review might be wise.
This commit is contained in:
Willy Tarreau 2009-06-21 21:45:58 +02:00
parent c9fe4562c2
commit ea38854d34
1 changed files with 3 additions and 12 deletions

View File

@ -778,8 +778,6 @@ struct task *process_session(struct task *t)
sess_set_term_flags(s);
}
s->req->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
if ((s->req->flags ^ flags) & BF_MASK_STATIC)
resync = 1;
}
@ -901,8 +899,6 @@ struct task *process_session(struct task *t)
if ((s->req->flags ^ rqf_last) & BF_MASK_STATIC)
resync = 1;
s->req->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
/* according to benchmarks, it makes sense to resync now */
if (s->req->prod->state == SI_ST_DIS || s->req->cons->state == SI_ST_DIS)
goto resync_stream_interface;
@ -925,8 +921,7 @@ struct task *process_session(struct task *t)
!(s->rep->flags & BF_FULL)) {
s->rep->hijacker(s, s->rep);
}
s->rep->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
if ((s->rep->flags ^ flags) & BF_MASK_STATIC)
resync = 1;
}
@ -956,8 +951,6 @@ struct task *process_session(struct task *t)
sess_set_term_flags(s);
}
s->rep->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
if ((s->rep->flags ^ flags) & BF_MASK_STATIC)
resync = 1;
}
@ -1044,8 +1037,6 @@ struct task *process_session(struct task *t)
if ((s->rep->flags ^ rpf_last) & BF_MASK_STATIC)
resync = 1;
s->rep->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
if (s->req->prod->state == SI_ST_DIS || s->req->cons->state == SI_ST_DIS)
goto resync_stream_interface;
@ -1096,8 +1087,8 @@ struct task *process_session(struct task *t)
if (s->req->cons->state == SI_ST_EST)
stream_sock_data_finish(s->req->cons);
s->req->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
s->rep->flags &= BF_CLEAR_READ & BF_CLEAR_WRITE & BF_CLEAR_TIMEOUT;
s->req->flags &= ~(BF_READ_NULL|BF_READ_PARTIAL|BF_WRITE_NULL|BF_WRITE_PARTIAL);
s->rep->flags &= ~(BF_READ_NULL|BF_READ_PARTIAL|BF_WRITE_NULL|BF_WRITE_PARTIAL);
s->si[0].prev_state = s->si[0].state;
s->si[1].prev_state = s->si[1].state;
s->si[0].flags &= ~(SI_FL_ERR|SI_FL_EXP);