diff options
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r-- | toxcore/onion.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c index 48e4c769..cec178b9 100644 --- a/toxcore/onion.c +++ b/toxcore/onion.c | |||
@@ -104,7 +104,7 @@ static int ipport_unpack(IP_Port *target, const uint8_t *data, unsigned int data | |||
104 | 104 | ||
105 | /* Create a new onion path. | 105 | /* Create a new onion path. |
106 | * | 106 | * |
107 | * Create a new onion path out of nodes (nodes is a list of 3 nodes) | 107 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) |
108 | * | 108 | * |
109 | * new_path must be an empty memory location of atleast Onion_Path size. | 109 | * new_path must be an empty memory location of atleast Onion_Path size. |
110 | * | 110 | * |
@@ -148,7 +148,7 @@ int create_onion_path(const DHT *dht, Onion_Path *new_path, const Node_format *n | |||
148 | */ | 148 | */ |
149 | int onion_path_to_nodes(Node_format *nodes, unsigned int num_nodes, const Onion_Path *path) | 149 | int onion_path_to_nodes(Node_format *nodes, unsigned int num_nodes, const Onion_Path *path) |
150 | { | 150 | { |
151 | if (num_nodes < 3) | 151 | if (num_nodes < ONION_PATH_LENGTH) |
152 | return -1; | 152 | return -1; |
153 | 153 | ||
154 | nodes[0].ip_port = path->ip_port1; | 154 | nodes[0].ip_port = path->ip_port1; |