aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/util.c b/util.c
index eee2a3d..585f81b 100644
--- a/util.c
+++ b/util.c
@@ -197,3 +197,17 @@ bitunpackmap(Map *m, uchar *buf, ulong len)
}
return n+1;
}
+
+int
+chanvprint(Channel *c, char *fmt, va_list arg)
+{
+ char *p;
+ int n;
+
+ p = vsmprint(fmt, arg);
+ if(p == nil)
+ sysfatal("vsmprint failed: %r");
+ n = sendp(c, p);
+ yield(); /* let recipient handle message immediately */
+ return n;
+}