[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26545 - in gnunet/src: include transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26545 - in gnunet/src: include transport |
Date: |
Thu, 21 Mar 2013 15:08:37 +0100 |
Author: wachs
Date: 2013-03-21 15:08:37 +0100 (Thu, 21 Mar 2013)
New Revision: 26545
Modified:
gnunet/src/include/gnunet_transport_service.h
gnunet/src/transport/gnunet-transport.c
gnunet/src/transport/test_quota_compliance.c
gnunet/src/transport/test_transport_api.c
gnunet/src/transport/test_transport_api_bidirectional_connect.c
gnunet/src/transport/test_transport_api_blacklisting.c
gnunet/src/transport/test_transport_api_disconnect.c
gnunet/src/transport/test_transport_api_limited_sockets.c
gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
gnunet/src/transport/test_transport_api_reliability.c
gnunet/src/transport/test_transport_api_restart_1peer.c
gnunet/src/transport/test_transport_api_restart_2peers.c
gnunet/src/transport/test_transport_api_timeout.c
gnunet/src/transport/test_transport_api_unreliability.c
gnunet/src/transport/test_transport_api_unreliability_constant.c
gnunet/src/transport/test_transport_startonly.c
gnunet/src/transport/test_transport_testing.c
gnunet/src/transport/transport-testing.c
gnunet/src/transport/transport_api.c
Log:
api fix
Modified: gnunet/src/include/gnunet_transport_service.h
===================================================================
--- gnunet/src/include/gnunet_transport_service.h 2013-03-21 14:08:17 UTC
(rev 26544)
+++ gnunet/src/include/gnunet_transport_service.h 2013-03-21 14:08:37 UTC
(rev 26545)
@@ -78,10 +78,7 @@
*/
typedef void (*GNUNET_TRANSPORT_NotifyConnect) (void *cls,
const struct
GNUNET_PeerIdentity
- * peer,
- const struct
- GNUNET_ATS_Information * ats,
- uint32_t ats_count);
+ * peer);
/**
* Function called to notify transport users that another
Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c 2013-03-21 14:08:17 UTC (rev
26544)
+++ gnunet/src/transport/gnunet-transport.c 2013-03-21 14:08:37 UTC (rev
26545)
@@ -519,8 +519,7 @@
* @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 @@
*
* @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();
Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c 2013-03-21 14:08:17 UTC
(rev 26544)
+++ gnunet/src/transport/test_quota_compliance.c 2013-03-21 14:08:37 UTC
(rev 26545)
@@ -213,8 +213,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api.c
===================================================================
--- gnunet/src/transport/test_transport_api.c 2013-03-21 14:08:17 UTC (rev
26544)
+++ gnunet/src/transport/test_transport_api.c 2013-03-21 14:08:37 UTC (rev
26545)
@@ -151,8 +151,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api_bidirectional_connect.c
===================================================================
--- gnunet/src/transport/test_transport_api_bidirectional_connect.c
2013-03-21 14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_bidirectional_connect.c
2013-03-21 14:08:37 UTC (rev 26545)
@@ -126,8 +126,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api_blacklisting.c
===================================================================
--- gnunet/src/transport/test_transport_api_blacklisting.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_blacklisting.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -179,8 +179,7 @@
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 @@
}
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;
Modified: gnunet/src/transport/test_transport_api_disconnect.c
===================================================================
--- gnunet/src/transport/test_transport_api_disconnect.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_disconnect.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -178,8 +178,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api_limited_sockets.c
===================================================================
--- gnunet/src/transport/test_transport_api_limited_sockets.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_limited_sockets.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -132,8 +132,7 @@
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 @@
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);
Modified: gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
2013-03-21 14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
2013-03-21 14:08:37 UTC (rev 26545)
@@ -162,12 +162,10 @@
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 @@
"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 @@
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;
Modified: gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
2013-03-21 14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
2013-03-21 14:08:37 UTC (rev 26545)
@@ -162,12 +162,10 @@
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 @@
"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 @@
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;
Modified: gnunet/src/transport/test_transport_api_reliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_reliability.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_reliability.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -188,8 +188,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api_restart_1peer.c
===================================================================
--- gnunet/src/transport/test_transport_api_restart_1peer.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_restart_1peer.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -174,8 +174,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api_restart_2peers.c
===================================================================
--- gnunet/src/transport/test_transport_api_restart_2peers.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_restart_2peers.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -171,8 +171,7 @@
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 @@
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;
Modified: gnunet/src/transport/test_transport_api_timeout.c
===================================================================
--- gnunet/src/transport/test_transport_api_timeout.c 2013-03-21 14:08:17 UTC
(rev 26544)
+++ gnunet/src/transport/test_transport_api_timeout.c 2013-03-21 14:08:37 UTC
(rev 26545)
@@ -147,8 +147,7 @@
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 @@
}
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);
Modified: gnunet/src/transport/test_transport_api_unreliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_unreliability.c 2013-03-21
14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_unreliability.c 2013-03-21
14:08:37 UTC (rev 26545)
@@ -284,8 +284,7 @@
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 @@
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",
Modified: gnunet/src/transport/test_transport_api_unreliability_constant.c
===================================================================
--- gnunet/src/transport/test_transport_api_unreliability_constant.c
2013-03-21 14:08:17 UTC (rev 26544)
+++ gnunet/src/transport/test_transport_api_unreliability_constant.c
2013-03-21 14:08:37 UTC (rev 26545)
@@ -206,8 +206,7 @@
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 @@
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",
Modified: gnunet/src/transport/test_transport_startonly.c
===================================================================
--- gnunet/src/transport/test_transport_startonly.c 2013-03-21 14:08:17 UTC
(rev 26544)
+++ gnunet/src/transport/test_transport_startonly.c 2013-03-21 14:08:37 UTC
(rev 26545)
@@ -80,8 +80,7 @@
}
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));
Modified: gnunet/src/transport/test_transport_testing.c
===================================================================
--- gnunet/src/transport/test_transport_testing.c 2013-03-21 14:08:17 UTC
(rev 26544)
+++ gnunet/src/transport/test_transport_testing.c 2013-03-21 14:08:37 UTC
(rev 26545)
@@ -97,8 +97,7 @@
}
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));
Modified: gnunet/src/transport/transport-testing.c
===================================================================
--- gnunet/src/transport/transport-testing.c 2013-03-21 14:08:17 UTC (rev
26544)
+++ gnunet/src/transport/transport-testing.c 2013-03-21 14:08:37 UTC (rev
26545)
@@ -67,8 +67,7 @@
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 @@
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));
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2013-03-21 14:08:17 UTC (rev
26544)
+++ gnunet/src/transport/transport_api.c 2013-03-21 14:08:37 UTC (rev
26545)
@@ -550,7 +550,7 @@
"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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26545 - in gnunet/src: include transport,
gnunet <=