aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_validation.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-11-30 14:45:27 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-11-30 14:45:27 +0000
commitb7fd524b858f2ab3af9183c1ead1bf54e44b312a (patch)
tree79d256cf1012df3f2fcef7b30ec33ace4e6644df /src/transport/gnunet-service-transport_validation.c
parentcdfc9de88b24d22a2c715834fcc66f4b68b55640 (diff)
downloadgnunet-b7fd524b858f2ab3af9183c1ead1bf54e44b312a.tar.gz
gnunet-b7fd524b858f2ab3af9183c1ead1bf54e44b312a.zip
some doxygen + refactoring of GST_validation_set_address_use
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r--src/transport/gnunet-service-transport_validation.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 641214b39..559589576 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -705,13 +705,12 @@ GST_validation_stop ()
705 * 705 *
706 * @param cls the PONG message 706 * @param cls the PONG message
707 * @param public_key public key for the peer, never NULL 707 * @param public_key public key for the peer, never NULL
708 * @param target peer this change is about, never NULL
709 * @param valid_until is ZERO if we never validated the address, 708 * @param valid_until is ZERO if we never validated the address,
710 * otherwise a time up to when we consider it (or was) valid 709 * otherwise a time up to when we consider it (or was) valid
711 * @param validation_block is FOREVER if the address is for an unsupported plugin (from PEERINFO) 710 * @param validation_block is FOREVER if the address is for an unsupported plugin (from PEERINFO)
712 * is ZERO if the address is considered valid (no validation needed) 711 * is ZERO if the address is considered valid (no validation needed)
713 * otherwise a time in the future if we're currently denying re-validation 712 * otherwise a time in the future if we're currently denying re-validation
714 * @param adress target address 713 * @param address target address
715 */ 714 */
716static void 715static void
717multicast_pong (void *cls, 716multicast_pong (void *cls,
@@ -1165,15 +1164,15 @@ GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
1165 * Based on this, the validation module will measure latency for the 1164 * Based on this, the validation module will measure latency for the
1166 * address more or less often. 1165 * address more or less often.
1167 * 1166 *
1168 * @param sender peer FIXME: redundant!
1169 * @param address the address 1167 * @param address the address
1168 * @param session the session
1170 * @param in_use GNUNET_YES if we are now using the address for a connection, 1169 * @param in_use GNUNET_YES if we are now using the address for a connection,
1171 * GNUNET_NO if we are no longer using the address for a connection 1170 * GNUNET_NO if we are no longer using the address for a connection
1172 */ 1171 */
1173void 1172void
1174GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender, 1173GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address,
1175 const struct GNUNET_HELLO_Address *address, 1174 struct Session *session,
1176 struct Session *session, int in_use) 1175 int in_use)
1177{ 1176{
1178 struct ValidationEntry *ve; 1177 struct ValidationEntry *ve;
1179 1178
@@ -1189,7 +1188,7 @@ GST_validation_set_address_use (const struct GNUNET_PeerIdentity *sender,
1189 if (ve->in_use == in_use) 1188 if (ve->in_use == in_use)
1190 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1189 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1191 "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n", 1190 "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n",
1192 GNUNET_i2s (sender), GST_plugins_a2s (address), ve->in_use, 1191 GNUNET_i2s (&address->peer), GST_plugins_a2s (address), ve->in_use,
1193 in_use); 1192 in_use);
1194 GNUNET_break (ve->in_use != in_use); /* should be different... */ 1193 GNUNET_break (ve->in_use != in_use); /* should be different... */
1195 ve->in_use = in_use; 1194 ve->in_use = in_use;