[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r16906: {tor} make it explicit that the uncompressed cached dir items are (tor/trunk/src/or)
Author: arma
Date: 2008-09-13 23:36:54 -0400 (Sat, 13 Sep 2008)
New Revision: 16906
Modified:
tor/trunk/src/or/or.h
Log:
make it explicit that the uncompressed cached dir items are nul-terminated
(they are, but now we should keep them that way)
Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h 2008-09-13 18:13:42 UTC (rev 16905)
+++ tor/trunk/src/or/or.h 2008-09-14 03:36:54 UTC (rev 16906)
@@ -1176,11 +1176,11 @@
/** A cached_dir_t represents a cacheable directory object, along with its
* compressed form. */
typedef struct cached_dir_t {
- char *dir; /**< Contents of this object */
+ char *dir; /**< Contents of this object, nul-terminated. */
char *dir_z; /**< Compressed contents of this object. */
- size_t dir_len; /**< Length of <b>dir</b> */
- size_t dir_z_len; /**< Length of <b>dir_z</b> */
- time_t published; /**< When was this object published */
+ size_t dir_len; /**< Length of <b>dir</b> (not counting its nul). */
+ size_t dir_z_len; /**< Length of <b>dir_z</b>. */
+ time_t published; /**< When was this object published. */
int refcnt; /**< Reference count for this cached_dir_t. */
} cached_dir_t;