summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-21 14:08:37 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-21 14:08:37 +0000
commit569a28bc648b2d073361fea5dcea2fb3daf5bd57 (patch)
treefcd7501aab6293d31bc4e82b0f59f24834325ee1 /src/transport
parent1c01ca33a8a4120bd47ce22d1856cb2f81355628 (diff)
api fix
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-transport.c8
-rw-r--r--src/transport/test_quota_compliance.c6
-rw-r--r--src/transport/test_transport_api.c6
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c6
-rw-r--r--src/transport/test_transport_api_blacklisting.c6
-rw-r--r--src/transport/test_transport_api_disconnect.c6
-rw-r--r--src/transport/test_transport_api_limited_sockets.c6
-rw-r--r--src/transport/test_transport_api_manipulation_recv_tcp.c20
-rw-r--r--src/transport/test_transport_api_manipulation_send_tcp.c21
-rw-r--r--src/transport/test_transport_api_reliability.c6
-rw-r--r--src/transport/test_transport_api_restart_1peer.c6
-rw-r--r--src/transport/test_transport_api_restart_2peers.c6
-rw-r--r--src/transport/test_transport_api_timeout.c6
-rw-r--r--src/transport/test_transport_api_unreliability.c6
-rw-r--r--src/transport/test_transport_api_unreliability_constant.c6
-rw-r--r--src/transport/test_transport_startonly.c3
-rw-r--r--src/transport/test_transport_testing.c3
-rw-r--r--src/transport/transport-testing.c5
-rw-r--r--src/transport/transport_api.c2
19 files changed, 36 insertions, 98 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index d606f05b9..929963127 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -519,8 +519,7 @@ transmit_data (void *cls, size_t size, void *buf)
* @param ats_count number of entries in ats (excluding 0-termination)
*/
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity)))
return;
@@ -598,12 +597,9 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
*
* @param cls closure
* @param peer the peer that connected
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
*/
static void
-monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
monitor_connect_counter ++;
struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 7f0247e50..37960e204 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -213,8 +213,7 @@ get_size (unsigned int iter)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
static int n;
unsigned int s;
@@ -358,8 +357,7 @@ notify_ready (void *cls, size_t size, void *buf)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
struct PeerContext *p = cls;
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 1316efe25..774bdd540 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -151,8 +151,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
@@ -246,8 +245,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index 39232160f..6745b9abb 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -126,8 +126,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
@@ -219,8 +218,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_blacklisting.c b/src/transport/test_transport_api_blacklisting.c
index 55adb5b10..7186d1b3f 100644
--- a/src/transport/test_transport_api_blacklisting.c
+++ b/src/transport/test_transport_api_blacklisting.c
@@ -179,8 +179,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
@@ -275,8 +274,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
}
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index 7a26c7eae..30f952a8a 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -178,8 +178,7 @@ stop_peer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
@@ -266,8 +265,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index 69a510005..b7a230283 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -132,8 +132,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received message of type %d from peer %s!\n",
@@ -178,8 +177,7 @@ notify_ready (void *cls, size_t size, void *buf)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
GNUNET_i2s (peer), cls);
diff --git a/src/transport/test_transport_api_manipulation_recv_tcp.c b/src/transport/test_transport_api_manipulation_recv_tcp.c
index efd4a481f..83d1431dc 100644
--- a/src/transport/test_transport_api_manipulation_recv_tcp.c
+++ b/src/transport/test_transport_api_manipulation_recv_tcp.c
@@ -162,12 +162,10 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
- int c;
if (0 == memcmp (peer, &p1->id, sizeof (struct GNUNET_PeerIdentity)))
t = p1;
@@ -231,19 +229,6 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
"Delayed message was not delayed correctly: took only %llu\n",
(long long unsigned int) dur_delayed.rel_value);
}
- for (c = 0; c < ats_count; c++)
- {
- if (ntohl (ats[c].type) == GNUNET_ATS_QUALITY_NET_DISTANCE)
- {
- if (ntohl (ats[c].value) == 10)
- ok += 0;
- else
- {
- GNUNET_break (0);
- ok += 1;
- }
- }
- }
/* shutdown */
end ();
}
@@ -323,8 +308,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c
index 3ec7f7bf3..5361e0aba 100644
--- a/src/transport/test_transport_api_manipulation_send_tcp.c
+++ b/src/transport/test_transport_api_manipulation_send_tcp.c
@@ -162,12 +162,10 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
- int c;
if (0 == memcmp (peer, &p1->id, sizeof (struct GNUNET_PeerIdentity)))
t = p1;
@@ -223,19 +221,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
"Delayed message was not delayed correctly: took only %llu\n",
(long long unsigned int) dur_delayed.rel_value);
}
- for (c = 0; c < ats_count; c++)
- {
- if (ntohl (ats[c].type) == GNUNET_ATS_QUALITY_NET_DISTANCE)
- {
- if (ntohl (ats[c].value) == 10)
- ok += 0;
- else
- {
- GNUNET_break (0);
- ok += 1;
- }
- }
- }
+
/* shutdown */
end ();
}
@@ -322,8 +308,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index bef2d0ffe..2993a224d 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -188,8 +188,7 @@ get_size (unsigned int iter)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
static int n;
unsigned int s;
@@ -346,8 +345,7 @@ notify_ready (void *cls, size_t size, void *buf)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
struct PeerContext *p = cls;
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c
index 9927946de..8472e29c0 100644
--- a/src/transport/test_transport_api_restart_1peer.c
+++ b/src/transport/test_transport_api_restart_1peer.c
@@ -174,8 +174,7 @@ restart (struct PeerContext *p, char *cfg_file)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
@@ -281,8 +280,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c
index 6e55f5734..7c1e03991 100644
--- a/src/transport/test_transport_api_restart_2peers.c
+++ b/src/transport/test_transport_api_restart_2peers.c
@@ -171,8 +171,7 @@ restart (struct PeerContext *p, char *cfg_file)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
struct PeerContext *p = cls;
struct PeerContext *t = NULL;
@@ -278,8 +277,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
static int c;
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c
index 264573937..607a2e123 100644
--- a/src/transport/test_transport_api_timeout.c
+++ b/src/transport/test_transport_api_timeout.c
@@ -147,8 +147,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received message of type %d from peer %s!\n",
@@ -156,8 +155,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
}
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
GNUNET_i2s (peer), cls);
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 3658198bd..afc26cef7 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -284,8 +284,7 @@ get_bit (const char *map, unsigned int bit)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
static int n;
@@ -434,8 +433,7 @@ notify_ready (void *cls, size_t size, void *buf)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index cb24675c1..e5c244081 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -206,8 +206,7 @@ get_size (unsigned int iter)
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+ const struct GNUNET_MessageHeader *message)
{
static int n;
@@ -360,8 +359,7 @@ notify_ready (void *cls, size_t size, void *buf)
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c
index 8593b897c..2deb3f58b 100644
--- a/src/transport/test_transport_startonly.c
+++ b/src/transport/test_transport_startonly.c
@@ -80,8 +80,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
}
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
GNUNET_i2s (peer));
diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c
index 95e7f22fc..747168b17 100644
--- a/src/transport/test_transport_testing.c
+++ b/src/transport/test_transport_testing.c
@@ -97,8 +97,7 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
}
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
GNUNET_i2s (peer));
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index bb0b86077..8875afb8e 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -67,8 +67,7 @@ find_connecting_context (struct GNUNET_TRANSPORT_TESTING_handle *tth,
static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
struct PeerContext *p = cls;
char *p2_s;
@@ -78,7 +77,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
GNUNET_assert (NULL != p->tth);
p2 = find_peer_context (p->tth, peer);
if (p->nc != NULL)
- p->nc (p->cb_cls, peer, ats, ats_count);
+ p->nc (p->cb_cls, peer);
if (p2 != NULL)
GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id));
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 48285302a..8dc4c7a42 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -550,7 +550,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
"CONNECT", GNUNET_i2s (&cim->id), ntohl (cim->quota_out.value__));
GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, cim->quota_out);
if (h->nc_cb != NULL)
- h->nc_cb (h->cls, &n->id, NULL, 0);
+ h->nc_cb (h->cls, &n->id);
break;
case GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT:
if (size != sizeof (struct DisconnectInfoMessage))