Index: trunk/Ohana/src/libohana/include/ohana.h
===================================================================
--- trunk/Ohana/src/libohana/include/ohana.h	(revision 7917)
+++ trunk/Ohana/src/libohana/include/ohana.h	(revision 7929)
@@ -173,4 +173,5 @@
 int ExpectCommand (int device, int length, double timeout, IOBuffer *buffer);
 int SendMessage (int device, char *format, ...);
+int SendMessageFixed (int device, int length, char *messge);
 int SendCommand (int device, int length, char *format, ...);
 int SendCommandV (int device, int length, char *format, va_list argp);
Index: trunk/Ohana/src/libohana/src/CommOps.c
===================================================================
--- trunk/Ohana/src/libohana/src/CommOps.c	(revision 7917)
+++ trunk/Ohana/src/libohana/src/CommOps.c	(revision 7929)
@@ -88,4 +88,14 @@
 }
 
+/* send a message of known size, sending the size first */
+int SendMessageFixed (int device, int length, char *message) {
+
+  int status;
+
+  status = SendCommand (device, 16, "NBYTES: %6d", length);
+  status = SendCommand (device, length, message);
+  return (status);
+}
+
 int SendCommand (int device, int length, char *format, ...) {
 
@@ -108,5 +118,4 @@
   vsnprintf (string, length + 1, format, argp);
 
-  /* fprintf (stderr, "msg: %s\n", string); */
   write (device, string, length);
   free (string);
Index: trunk/Ohana/src/libohana/src/IOBufferOps.c
===================================================================
--- trunk/Ohana/src/libohana/src/IOBufferOps.c	(revision 7917)
+++ trunk/Ohana/src/libohana/src/IOBufferOps.c	(revision 7929)
@@ -107,5 +107,5 @@
   Nbyte = vsnprintf (&tmp, 0, format, argp);
 
-  if (buffer[0].Nbuffer + Nbyte + 1 >= buffer[0].Nalloc) {
+  if (buffer[0].Nbuffer + Nbyte + 1>= buffer[0].Nalloc) {
     buffer[0].Nalloc = buffer[0].Nbuffer + Nbyte + 64;
     REALLOCATE (buffer[0].buffer, char, buffer[0].Nalloc);
@@ -113,5 +113,5 @@
 
   vsnprintf (&buffer[0].buffer[buffer[0].Nbuffer], Nbyte + 1, format, argp);
-  buffer[0].Nbuffer += Nbyte + 1;
+  buffer[0].Nbuffer += Nbyte;
   return (TRUE);
 }
