projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
02c6e4b
)
stuff
author
Christian Grothoff
<christian@grothoff.org>
Thu, 21 Jan 2010 14:31:14 +0000
(14:31 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Thu, 21 Jan 2010 14:31:14 +0000
(14:31 +0000)
src/core/core_api_peer_get_info.c
patch
|
blob
|
history
src/core/gnunet-service-core.c
patch
|
blob
|
history
src/transport/gnunet-service-transport_blacklist.c
patch
|
blob
|
history
src/transport/gnunet-service-transport_blacklist.h
patch
|
blob
|
history
src/transport/transport.h
patch
|
blob
|
history
diff --git
a/src/core/core_api_peer_get_info.c
b/src/core/core_api_peer_get_info.c
index 82785980fae14269a3e8ff94e5c22b18fdc05539..d7ecd9cbb22b6249f7da56f370066e702e7dd2d5 100644
(file)
--- a/
src/core/core_api_peer_get_info.c
+++ b/
src/core/core_api_peer_get_info.c
@@
-77,7
+77,7
@@
receive_info (void *cls,
GNUNET_break (0);
if (irc->info != NULL)
irc->info (irc->info_cls,
GNUNET_break (0);
if (irc->info != NULL)
irc->info (irc->info_cls,
- NULL, 0, 0,
GNUNET_TIME_UNIT_FOREVER_REL,
0, 0);
+ NULL, 0, 0, 0, 0);
GNUNET_CLIENT_disconnect (irc->client);
GNUNET_free (irc);
return;
GNUNET_CLIENT_disconnect (irc->client);
GNUNET_free (irc);
return;
diff --git
a/src/core/gnunet-service-core.c
b/src/core/gnunet-service-core.c
index 0f4a3c3b9612f427d7df32a904c77ccdbb2c499e..d0fd6893ede4f5c5579918a2976369387a0c79d9 100644
(file)
--- a/
src/core/gnunet-service-core.c
+++ b/
src/core/gnunet-service-core.c
@@
-524,6
+524,12
@@
struct Neighbour
*/
uint32_t ping_challenge;
*/
uint32_t ping_challenge;
+ /**
+ * What was the last distance to this peer as reported by the transports?
+ * (FIXME: actually set this!)
+ */
+ uint32_t last_distance;
+
/**
* What is our connection status?
*/
/**
* What is our connection status?
*/
@@
-1005,7
+1011,8
@@
handle_client_init (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending `%s' message to client.\n", "NOTIFY_CONNECT");
#endif
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending `%s' message to client.\n", "NOTIFY_CONNECT");
#endif
- cnm.reserved = htonl (0);
+ cnm.distance = htonl (n->last_distance);
+ cnm.latency = GNUNET_TIME_relative_hton (n->last_latency);
cnm.peer = n->peer;
send_to_client (c, &cnm.header, GNUNET_NO);
n = n->next;
cnm.peer = n->peer;
send_to_client (c, &cnm.header, GNUNET_NO);
n = n->next;
@@
-1114,7
+1121,6
@@
handle_client_request_info (void *cls,
cim.reserved_amount = htonl (reserv);
cim.bpm_in = htonl (n->bpm_in);
cim.bpm_out = htonl (n->bpm_out);
cim.reserved_amount = htonl (reserv);
cim.bpm_in = htonl (n->bpm_in);
cim.bpm_out = htonl (n->bpm_out);
- cim.latency = GNUNET_TIME_relative_hton (n->last_latency);
cim.preference = n->current_preference;
}
cim.header.size = htons (sizeof (struct ConfigurationInfoMessage));
cim.preference = n->current_preference;
}
cim.header.size = htons (sizeof (struct ConfigurationInfoMessage));
@@
-2613,6
+2619,8
@@
handle_pong (struct Neighbour *n, const struct PingMessage *m)
}
cnm.header.size = htons (sizeof (struct ConnectNotifyMessage));
cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT);
}
cnm.header.size = htons (sizeof (struct ConnectNotifyMessage));
cnm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT);
+ cnm.distance = htonl (0); /* FIXME */
+ cnm.latency = GNUNET_TIME_relative_hton (GNUNET_TIME_UNIT_ZERO); /* FIXME */
cnm.reserved = htonl (0);
cnm.peer = n->peer;
send_to_all_clients (&cnm.header, GNUNET_YES, GNUNET_CORE_OPTION_SEND_CONNECT);
cnm.reserved = htonl (0);
cnm.peer = n->peer;
send_to_all_clients (&cnm.header, GNUNET_YES, GNUNET_CORE_OPTION_SEND_CONNECT);
diff --git
a/src/transport/gnunet-service-transport_blacklist.c
b/src/transport/gnunet-service-transport_blacklist.c
index 623f8c3f26b095f608e6e3c500d53f01bb11edb6..b51f5144260d3429487e0ace4f7b1e3c7c96a6d1 100644
(file)
--- a/
src/transport/gnunet-service-transport_blacklist.c
+++ b/
src/transport/gnunet-service-transport_blacklist.c
@@
-25,6
+25,7
@@
*/
#include "platform.h"
#include "gnunet_protocols.h"
*/
#include "platform.h"
#include "gnunet_protocols.h"
+#include "gnunet_util_lib.h"
#include "gnunet_service_lib.h"
#include "transport.h"
#include "gnunet-service-transport_blacklist.h"
#include "gnunet_service_lib.h"
#include "transport.h"
#include "gnunet-service-transport_blacklist.h"
@@
-183,6
+184,11
@@
GNUNET_TRANSPORT_handle_blacklist_notify (void *cls,
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
+ struct BlacklistNotificationList *bnl;
+
+ bnl = GNUNET_malloc (sizeof (struct BlacklistNotificationList));
+ bnl->next = blacklist_notifiers;
+ blacklist_notifiers = bnl;
/* FIXME */
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
/* FIXME */
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
diff --git
a/src/transport/gnunet-service-transport_blacklist.h
b/src/transport/gnunet-service-transport_blacklist.h
index cce1013c152985ac283b505d1f312d929182fab0..46a65cb61defc12a6bfb3e2e1b82441775b7ce5d 100644
(file)
--- a/
src/transport/gnunet-service-transport_blacklist.h
+++ b/
src/transport/gnunet-service-transport_blacklist.h
@@
-23,14
+23,13
@@
* @brief internal API for blacklisting functionality
* @author Christian Grothoff
*/
* @brief internal API for blacklisting functionality
* @author Christian Grothoff
*/
-#include "platform.h"
+#ifndef GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
+#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
+
#include "gnunet_protocols.h"
#include "gnunet_service_lib.h"
#include "transport.h"
#include "gnunet_protocols.h"
#include "gnunet_service_lib.h"
#include "transport.h"
-#ifndef GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
-#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
-
/**
* Handle a request to blacklist a peer.
*
/**
* Handle a request to blacklist a peer.
*
diff --git
a/src/transport/transport.h
b/src/transport/transport.h
index 0970b3648e7cce86702eaa7b85c043ab5e6c1019..603f1bbc1e5d4e9c223175c3f253ba254d981c85 100644
(file)
--- a/
src/transport/transport.h
+++ b/
src/transport/transport.h
@@
-23,6
+23,9
@@
* @brief common internal definitions for transport service
* @author Christian Grothoff
*/
* @brief common internal definitions for transport service
* @author Christian Grothoff
*/
+#ifndef TRANSPORT_H
+#define TRANSPORT_H
+
#include "gnunet_crypto_lib.h"
#include "gnunet_time_lib.h"
#include "gnunet_transport_service.h"
#include "gnunet_crypto_lib.h"
#include "gnunet_time_lib.h"
#include "gnunet_transport_service.h"
@@
-309,3
+312,4
@@
struct BlacklistMessage
/* end of transport.h */
/* end of transport.h */
+#endif