diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-30 10:05:03 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-30 10:05:03 +0000 |
commit | 7f7fac1c724593de90b6e8d40796e0d10fc2694b (patch) | |
tree | d9e46e7d7cd0c83cce644d8cf55abe7af2b1a3d6 /src/transport/gnunet-service-transport_validation.c | |
parent | f5ffb404fcb5a5585370dbc0a6975ff8fb6f31ee (diff) | |
download | gnunet-7f7fac1c724593de90b6e8d40796e0d10fc2694b.tar.gz gnunet-7f7fac1c724593de90b6e8d40796e0d10fc2694b.zip |
- debugging code for mantis 2216
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index a6d942497..6a13061cc 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -1211,13 +1211,16 @@ GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, | |||
1211 | * @param session the session | 1211 | * @param session the session |
1212 | * @param in_use GNUNET_YES if we are now using the address for a connection, | 1212 | * @param in_use GNUNET_YES if we are now using the address for a connection, |
1213 | * GNUNET_NO if we are no longer using the address for a connection | 1213 | * GNUNET_NO if we are no longer using the address for a connection |
1214 | * @param line line of caller just for DEBUGGING! | ||
1214 | */ | 1215 | */ |
1215 | void | 1216 | void |
1216 | GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address, | 1217 | GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address, |
1217 | struct Session *session, | 1218 | struct Session *session, |
1218 | int in_use) | 1219 | int in_use, |
1220 | int line) | ||
1219 | { | 1221 | { |
1220 | struct ValidationEntry *ve; | 1222 | struct ValidationEntry *ve; |
1223 | static int last_calling_line = 0; | ||
1221 | 1224 | ||
1222 | if (NULL != address) | 1225 | if (NULL != address) |
1223 | ve = find_validation_entry (NULL, address); | 1226 | ve = find_validation_entry (NULL, address); |
@@ -1229,10 +1232,16 @@ GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address, | |||
1229 | return; | 1232 | return; |
1230 | } | 1233 | } |
1231 | if (ve->in_use == in_use) | 1234 | if (ve->in_use == in_use) |
1235 | { | ||
1232 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1236 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1233 | "GST_validation_set_address_use: %s %s: ve->in_use %i <-> in_use %i\n", | 1237 | "Error setting address in use for peer `%s' `%s': %s -> %s; set last time by %i, called now by %i\n", |
1234 | GNUNET_i2s (&address->peer), GST_plugins_a2s (address), ve->in_use, | 1238 | |
1235 | in_use); | 1239 | GNUNET_i2s (&address->peer), GST_plugins_a2s (address), |
1240 | (GNUNET_NO == ve->in_use) ? "NOT USED" : "USED", | ||
1241 | (GNUNET_NO == in_use) ? "NOT USED" : "USED", | ||
1242 | last_calling_line, line); | ||
1243 | } | ||
1244 | last_calling_line = line; | ||
1236 | GNUNET_break (ve->in_use != in_use); /* should be different... */ | 1245 | GNUNET_break (ve->in_use != in_use); /* should be different... */ |
1237 | ve->in_use = in_use; | 1246 | ve->in_use = in_use; |
1238 | if (in_use == GNUNET_YES) | 1247 | if (in_use == GNUNET_YES) |