diff options
author | rsc <devnull@localhost> | 2005-07-13 10:51:30 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-07-13 10:51:30 +0000 |
commit | a28c0548f4a9c621c3fce2d0bcf66727694deffa (patch) | |
tree | 276bcb5f6cb80ea979f15b4bf69cc62c11b04eee /src/libmux | |
parent | 2d70c581f4346401c61e6bb25b3e31b001f05e0a (diff) | |
download | plan9port-a28c0548f4a9c621c3fce2d0bcf66727694deffa.tar.gz plan9port-a28c0548f4a9c621c3fce2d0bcf66727694deffa.tar.bz2 plan9port-a28c0548f4a9c621c3fce2d0bcf66727694deffa.zip |
better errors
Diffstat (limited to 'src/libmux')
-rw-r--r-- | src/libmux/mux.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libmux/mux.c b/src/libmux/mux.c index f8620141..90c1cfcc 100644 --- a/src/libmux/mux.c +++ b/src/libmux/mux.c @@ -35,8 +35,10 @@ muxrpc(Mux *mux, void *tx) /* must malloc because stack could be private */ r = mallocz(sizeof(Muxrpc), 1); - if(r == nil) + if(r == nil){ + werrstr("mallocz: %r"); return nil; + } r->r.l = &mux->lk; /* assign the tag, add selves to response queue */ @@ -48,6 +50,8 @@ muxrpc(Mux *mux, void *tx) /* actually send the packet */ if(tag < 0 || mux->settag(mux, tx, tag) < 0 || _muxsend(mux, tx) < 0){ + werrstr("settag/send tag %d: %r", tag); + fprint(2, "%r\n"); qlock(&mux->lk); dequeue(mux, r); puttag(mux, r); @@ -105,6 +109,8 @@ muxrpc(Mux *mux, void *tx) p = r->p; puttag(mux, r); qunlock(&mux->lk); + if(p == nil) + werrstr("unexpected eof"); return p; } |