aboutsummaryrefslogtreecommitdiff
path: root/src/libmux
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmux')
-rw-r--r--src/libmux/mux.c8
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;
}