diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-02 22:25:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-02 22:25:48 +0000 |
commit | 69c3a52cfa679175da8f06bdcb8e2e4195465e44 (patch) | |
tree | 73109126cfcf1a807c5dc1e778f40b955fc959c5 /src/transport/gnunet-service-transport_blacklist.c | |
parent | c42deb089faffd654e27bf661ce85d5c1bb38b7a (diff) | |
download | gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.tar.gz gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.zip |
avoid passing both PeerIdentity and Address (which contains PeerIdentity) if address is always present as then this is redundant
Diffstat (limited to 'src/transport/gnunet-service-transport_blacklist.c')
-rw-r--r-- | src/transport/gnunet-service-transport_blacklist.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index f1904a5d3..d19ff2e9b 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -501,7 +501,7 @@ struct TestConnectionContext | |||
501 | * blacklisting client. | 501 | * blacklisting client. |
502 | * | 502 | * |
503 | * @param cls the `struct TestConnectionContext *` | 503 | * @param cls the `struct TestConnectionContext *` |
504 | * @param peer neighbour's identity | 504 | * @param peer identity of the peer |
505 | * @param address the address | 505 | * @param address the address |
506 | * @param state current state this peer is in | 506 | * @param state current state this peer is in |
507 | * @param state_timeout timeout for the current state of the peer | 507 | * @param state_timeout timeout for the current state of the peer |
@@ -509,18 +509,21 @@ struct TestConnectionContext | |||
509 | * @param bandwidth_out bandwidth assigned outbound | 509 | * @param bandwidth_out bandwidth assigned outbound |
510 | */ | 510 | */ |
511 | static void | 511 | static void |
512 | test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *peer, | 512 | test_connection_ok (void *cls, |
513 | const struct GNUNET_HELLO_Address *address, | 513 | const struct GNUNET_PeerIdentity *peer, |
514 | enum GNUNET_TRANSPORT_PeerState state, | 514 | const struct GNUNET_HELLO_Address *address, |
515 | struct GNUNET_TIME_Absolute state_timeout, | 515 | enum GNUNET_TRANSPORT_PeerState state, |
516 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 516 | struct GNUNET_TIME_Absolute state_timeout, |
517 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) | 517 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
518 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) | ||
518 | { | 519 | { |
519 | struct TestConnectionContext *tcc = cls; | 520 | struct TestConnectionContext *tcc = cls; |
520 | struct GST_BlacklistCheck *bc; | 521 | struct GST_BlacklistCheck *bc; |
521 | 522 | ||
522 | bc = GNUNET_new (struct GST_BlacklistCheck); | 523 | bc = GNUNET_new (struct GST_BlacklistCheck); |
523 | GNUNET_CONTAINER_DLL_insert(bc_head, bc_tail, bc); | 524 | GNUNET_CONTAINER_DLL_insert (bc_head, |
525 | bc_tail, | ||
526 | bc); | ||
524 | bc->peer = *peer; | 527 | bc->peer = *peer; |
525 | bc->cont = &confirm_or_drop_neighbour; | 528 | bc->cont = &confirm_or_drop_neighbour; |
526 | bc->cont_cls = NULL; | 529 | bc->cont_cls = NULL; |