diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-26 13:03:08 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-26 13:03:08 +0000 |
commit | e649f76bd5eb2d08a976c34f394dd8411130e37c (patch) | |
tree | 2c439acd86f38a299b7870ad1e82705262e0b788 /src | |
parent | 4753969fdd3f150ffa0a84036abff79af878346f (diff) | |
download | gnunet-e649f76bd5eb2d08a976c34f394dd8411130e37c.tar.gz gnunet-e649f76bd5eb2d08a976c34f394dd8411130e37c.zip |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/dv/gnunet-service-dv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 1487fc4f6..4479c0b08 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -962,7 +962,7 @@ handle_direct_disconnect (struct DirectNeighbor *neighbor) | |||
962 | */ | 962 | */ |
963 | static void | 963 | static void |
964 | handle_ats_update (void *cls, | 964 | handle_ats_update (void *cls, |
965 | const struct GNUNET_HELLO_Address *address, | 965 | const struct GNUNET_PeerIdentity *peer, |
966 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 966 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
967 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 967 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
968 | const struct GNUNET_ATS_Information *ats, | 968 | const struct GNUNET_ATS_Information *ats, |
@@ -975,7 +975,7 @@ handle_ats_update (void *cls, | |||
975 | distance = get_atsi_distance (ats, ats_count); | 975 | distance = get_atsi_distance (ats, ats_count); |
976 | /* check if entry exists */ | 976 | /* check if entry exists */ |
977 | neighbor = GNUNET_CONTAINER_multihashmap_get (direct_neighbors, | 977 | neighbor = GNUNET_CONTAINER_multihashmap_get (direct_neighbors, |
978 | &address->peer.hashPubKey); | 978 | &peer->hashPubKey); |
979 | if (NULL != neighbor) | 979 | if (NULL != neighbor) |
980 | { | 980 | { |
981 | if ( (DIRECT_NEIGHBOR_COST == neighbor->distance) && | 981 | if ( (DIRECT_NEIGHBOR_COST == neighbor->distance) && |
@@ -1002,10 +1002,10 @@ handle_ats_update (void *cls, | |||
1002 | return; | 1002 | return; |
1003 | } | 1003 | } |
1004 | neighbor = GNUNET_malloc (sizeof (struct DirectNeighbor)); | 1004 | neighbor = GNUNET_malloc (sizeof (struct DirectNeighbor)); |
1005 | neighbor->peer = address->peer; | 1005 | neighbor->peer = (*peer); |
1006 | GNUNET_assert (GNUNET_YES == | 1006 | GNUNET_assert (GNUNET_YES == |
1007 | GNUNET_CONTAINER_multihashmap_put (direct_neighbors, | 1007 | GNUNET_CONTAINER_multihashmap_put (direct_neighbors, |
1008 | &address->peer.hashPubKey, | 1008 | &peer->hashPubKey, |
1009 | neighbor, | 1009 | neighbor, |
1010 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 1010 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
1011 | neighbor->connected = GNUNET_NO; /* not yet */ | 1011 | neighbor->connected = GNUNET_NO; /* not yet */ |
@@ -1699,7 +1699,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1699 | 1699 | ||
1700 | if (NULL == core_api) | 1700 | if (NULL == core_api) |
1701 | return; | 1701 | return; |
1702 | ats = GNUNET_ATS_performance_init (cfg, &handle_ats_update, NULL); | 1702 | ats = GNUNET_ATS_performance_init (cfg, &handle_ats_update, NULL, NULL, NULL); |
1703 | if (NULL == ats) | 1703 | if (NULL == ats) |
1704 | { | 1704 | { |
1705 | GNUNET_CORE_disconnect (core_api); | 1705 | GNUNET_CORE_disconnect (core_api); |