Move Autoconf's macro definitions into config.h.
[openvswitch] / lib / vconn-tcp.c
index 50304d33017fc10249efb39b4080ecde793e3628..7fbec081ea9f80734742f9c22cb2bf8b81cff454 100644 (file)
@@ -31,6 +31,7 @@
  * derivatives without specific, written prior permission.
  */
 
+#include <config.h>
 #include "vconn.h"
 #include <assert.h>
 #include <errno.h>
@@ -117,7 +118,8 @@ tcp_open(const char *name, char *suffix, struct vconn **vconnp)
     host_name = strtok_r(suffix, "::", &save_ptr);
     port_string = strtok_r(NULL, "::", &save_ptr);
     if (!host_name) {
-        fatal(0, "%s: bad peer name format", name);
+        error(0, "%s: bad peer name format", name);
+        return EAFNOSUPPORT;
     }
 
     memset(&sin, 0, sizeof sin);
@@ -200,7 +202,7 @@ again:
             return 0;
         }
     }
-    buffer_reserve_tailroom(rx, want_bytes);
+    buffer_prealloc_tailroom(rx, want_bytes);
 
     retval = read(tcp->fd, buffer_tail(rx), want_bytes);
     if (retval > 0) {