]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - net.c
fd: Make write_all() receive the length by value.
[paraslash.git] / net.c
diff --git a/net.c b/net.c
index ae596e5a7007260dd3a2954932f3927e88ea3bdd..d32cc7eeb611279d936ef8cfd98dda644f06d799 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -576,8 +576,14 @@ static inline int estimated_header_overhead(const int af_type)
 }
 
 /**
- * Maximum transport-layer message size (MMS_S) as per RFC 1122, 3.3.3
- * Socket must be connected.
+ * Get the maximum transport-layer message size (MMS_S).
+ *
+ * \param sockfd The socket file descriptor.
+ *
+ * The socket must be connected. See RFC 1122, 3.3.3. If the protocol familiy
+ * could not be determined, \p AF_INET is assumed.
+ *
+ * \return The maximum message size of the address family type.
  */
 int generic_max_transport_msg_size(int sockfd)
 {
@@ -699,7 +705,7 @@ int send_bin_buffer(int fd, const char *buf, size_t len)
 {
        if (!len)
                PARA_CRIT_LOG("len == 0\n");
-       return write_all(fd, buf, &len);
+       return write_all(fd, buf, len);
 }
 
 /**