summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-21 03:38:46 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-21 03:38:46 +0000
commit1df0647c668645268b1b9c0246b91cad709e3708 (patch)
tree5665c29c7daa5aaee70dc18d33019e9fd576346e /src/common
parent7b022eda9c43c897e50c3b03a8201c132f76229c (diff)
downloadtor-1df0647c668645268b1b9c0246b91cad709e3708.tar.gz
tor-1df0647c668645268b1b9c0246b91cad709e3708.zip
r18291@catbus: nickm | 2008-02-20 22:35:32 -0500
Resolve all DOCDOC issues, and document some other undocumented code, and fix a changelog entry. svn:r13638
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c5
-rw-r--r--src/common/compat.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index cb88864f27..f789b8310d 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -489,7 +489,10 @@ touch_file(const char *fname)
#undef DEBUG_SOCKET_COUNTING
#ifdef DEBUG_SOCKET_COUNTING
+/** A bitarray of all fds that should be passed to tor_socket_close(). Only
+ * used if DEBUG_SOCKET_COUNTING is defined. */
static bitarray_t *open_sockets = NULL;
+/** The size of <b>open_sockets</b>, in bits. */
static int max_socket = -1;
#endif
@@ -547,6 +550,8 @@ tor_close_socket(int s)
}
#ifdef DEBUG_SOCKET_COUNTING
+/** Helper: if DEBUG_SOCKET_COUNTING is enabled, remember that <b>s</b> is
+ * now an open socket. */
static INLINE void
mark_socket_open(int s)
{
diff --git a/src/common/compat.h b/src/common/compat.h
index 0d6fd87dde..3ac38d7dac 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -331,7 +331,8 @@ struct sockaddr_in6 {
typedef uint8_t maskbits_t;
struct in_addr;
-/** DOCDOC */
+/** Holds an IPv4 or IPv6 address. (Uses less memory than struct
+ * sockaddr_storage.) */
typedef struct tor_addr_t
{
sa_family_t family;