[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Extract crypt_path_reference_t into its own header.



commit c846b0e486786f228a51f39d32b83d83f15bd3cd
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Jun 15 11:57:48 2018 -0400

    Extract crypt_path_reference_t into its own header.
---
 src/or/circuitlist.c             |  1 +
 src/or/crypt_path_reference_st.h | 23 +++++++++++++++++++++++
 src/or/include.am                |  1 +
 src/or/or.h                      | 13 +------------
 src/or/rendservice.c             |  1 +
 5 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 7601bc613..3f03ae2f4 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -92,6 +92,7 @@
 
 #include "ht.h"
 
+#include "crypt_path_reference_st.h"
 #include "dir_connection_st.h"
 #include "edge_connection_st.h"
 #include "or_circuit_st.h"
diff --git a/src/or/crypt_path_reference_st.h b/src/or/crypt_path_reference_st.h
new file mode 100644
index 000000000..2758a281c
--- /dev/null
+++ b/src/or/crypt_path_reference_st.h
@@ -0,0 +1,23 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef CRYPT_PATH_REFERENCE_ST_H
+#define CRYPT_PATH_REFERENCE_ST_H
+
+/** A reference-counted pointer to a crypt_path_t, used only to share
+ * the final rendezvous cpath to be used on a service-side rendezvous
+ * circuit among multiple circuits built in parallel to the same
+ * destination rendezvous point. */
+struct crypt_path_reference_t {
+  /** The reference count. */
+  unsigned int refcount;
+  /** The pointer.  Set to NULL when the crypt_path_t is put into use
+   * on an opened rendezvous circuit. */
+  crypt_path_t *cpath;
+};
+
+#endif
+
diff --git a/src/or/include.am b/src/or/include.am
index 0a58796e0..e15b58c38 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -207,6 +207,7 @@ ORHEADERS = \
 	src/or/control_connection_st.h			\
 	src/or/control.h				\
 	src/or/crypt_path_st.h				\
+	src/or/crypt_path_reference_st.h		\
 	src/or/cpuworker.h				\
 	src/or/directory.h				\
 	src/or/dirserv.h				\
diff --git a/src/or/or.h b/src/or/or.h
index df232604e..5c8267cf5 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2280,18 +2280,7 @@ typedef struct {
 
 typedef struct relay_crypto_t relay_crypto_t;
 typedef struct crypt_path_t crypt_path_t;
-
-/** A reference-counted pointer to a crypt_path_t, used only to share
- * the final rendezvous cpath to be used on a service-side rendezvous
- * circuit among multiple circuits built in parallel to the same
- * destination rendezvous point. */
-typedef struct {
-  /** The reference count. */
-  unsigned int refcount;
-  /** The pointer.  Set to NULL when the crypt_path_t is put into use
-   * on an opened rendezvous circuit. */
-  crypt_path_t *cpath;
-} crypt_path_reference_t;
+typedef struct crypt_path_reference_t crypt_path_reference_t;
 
 #define CPATH_KEY_MATERIAL_LEN (20*2+16*2)
 
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 09a52ea07..20a4288af 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -37,6 +37,7 @@
 #include "routerset.h"
 
 #include "crypt_path_st.h"
+#include "crypt_path_reference_st.h"
 #include "edge_connection_st.h"
 #include "origin_circuit_st.h"
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits