handle non-zero mintag properly

This commit is contained in:
rsc 2005-01-30 15:59:09 +00:00
parent 65da859889
commit 0b22e9bd85

View file

@ -70,7 +70,7 @@ muxrpc(Mux *mux, void *tx)
qunlock(&mux->lk); qunlock(&mux->lk);
p = _muxrecv(mux); p = _muxrecv(mux);
if(p) if(p)
tag = mux->gettag(mux, p); tag = mux->gettag(mux, p) - mux->mintag;
else else
tag = ~0; tag = ~0;
//print("mux tag %d\n", tag); //print("mux tag %d\n", tag);
@ -171,7 +171,7 @@ Found:
mux->nwait++; mux->nwait++;
mux->wait[i] = r; mux->wait[i] = r;
r->tag = i+mux->mintag; r->tag = i+mux->mintag;
return i; return r->tag;
} }
static void static void