[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32153 - in gnunet/src: ats-tests core include transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32153 - in gnunet/src: ats-tests core include transport |
Date: |
Sun, 2 Feb 2014 18:38:22 +0100 |
Author: grothoff
Date: 2014-02-02 18:38:22 +0100 (Sun, 02 Feb 2014)
New Revision: 32153
Modified:
gnunet/src/ats-tests/ats-testing-traffic.c
gnunet/src/core/gnunet-service-core_neighbours.c
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_cfg.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_monitoring.c
gnunet/src/transport/test_transport_api_monitoring_validation.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_unreliability.c
gnunet/src/transport/test_transport_api_unreliability_constant.c
gnunet/src/transport/transport.h
gnunet/src/transport/transport_api.c
Log:
removing depreated 'priority' argument from
GNUNET_TRANSPORT_notify_transmit_ready
Modified: gnunet/src/ats-tests/ats-testing-traffic.c
===================================================================
--- gnunet/src/ats-tests/ats-testing-traffic.c 2014-02-02 17:25:33 UTC (rev
32152)
+++ gnunet/src/ats-tests/ats-testing-traffic.c 2014-02-02 17:38:22 UTC (rev
32153)
@@ -77,6 +77,7 @@
return delay;
}
+
static size_t
send_ping_ready_cb (void *cls, size_t size, void *buf)
{
@@ -96,24 +97,24 @@
return 0;
}
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Master [%u]: Sending PING to [%u]\n",
- p->me->no, p->dest->no);
-
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
+ "Master [%u]: Sending PING to [%u]\n",
+ p->me->no, p->dest->no);
if (top->test_core)
{
- if (NULL == p->cth)
- {
- GNUNET_break (0);
- }
- p->cth = NULL;
+ if (NULL == p->cth)
+ {
+ GNUNET_break (0);
+ }
+ p->cth = NULL;
}
else
{
- if (NULL == p->tth)
- {
- GNUNET_break (0);
- }
- p->tth = NULL;
+ if (NULL == p->tth)
+ {
+ GNUNET_break (0);
+ }
+ p->tth = NULL;
}
msg = (struct GNUNET_MessageHeader *) &msgbuf;
@@ -145,30 +146,32 @@
static void
comm_schedule_send (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext* tc)
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct BenchmarkPartner *p = cls;
p->tg->send_task = GNUNET_SCHEDULER_NO_TASK;
-
p->last_message_sent = GNUNET_TIME_absolute_get();
if (GNUNET_YES == top->test_core)
{
- p->cth = GNUNET_CORE_notify_transmit_ready (
- p->me->ch, GNUNET_NO,
- GNUNET_CORE_PRIO_BEST_EFFORT,
- GNUNET_TIME_UNIT_MINUTES, &p->dest->id,
- TEST_MESSAGE_SIZE, &send_ping_ready_cb, p);
+ p->cth = GNUNET_CORE_notify_transmit_ready (p->me->ch, GNUNET_NO,
+ GNUNET_CORE_PRIO_BEST_EFFORT,
+ GNUNET_TIME_UNIT_MINUTES,
+ &p->dest->id,
+ TEST_MESSAGE_SIZE,
+ &send_ping_ready_cb, p);
}
else
{
- p->tth = GNUNET_TRANSPORT_notify_transmit_ready (
- p->me->th, &p->dest->id, TEST_MESSAGE_SIZE, 0,GNUNET_TIME_UNIT_MINUTES,
- &send_ping_ready_cb, p);
+ p->tth = GNUNET_TRANSPORT_notify_transmit_ready (p->me->th,
+ &p->dest->id,
+ TEST_MESSAGE_SIZE,
+ GNUNET_TIME_UNIT_MINUTES,
+ &send_ping_ready_cb, p);
}
-
}
+
static size_t
comm_send_pong_ready (void *cls, size_t size, void *buf)
{
@@ -223,11 +226,12 @@
{
GNUNET_assert (NULL == p->tth);
p->tth = GNUNET_TRANSPORT_notify_transmit_ready (p->me->th, &p->dest->id,
- TEST_MESSAGE_SIZE, 0, GNUNET_TIME_UNIT_MINUTES, &comm_send_pong_ready,
+ TEST_MESSAGE_SIZE, GNUNET_TIME_UNIT_MINUTES, &comm_send_pong_ready,
p);
}
}
+
void
GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p)
{
@@ -265,9 +269,8 @@
* Generate between the source master and the partner and send traffic with a
* maximum rate.
*
- * @base_rate traffic base rate to send data with
- * @max_rate traffic maximum rate to send data with
- * @frequency
+ * @param base_rate traffic base rate to send data with
+ * @param max_rate traffic maximum rate to send data with
*/
struct TrafficGenerator *
GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src,
@@ -278,8 +281,7 @@
struct GNUNET_TIME_Relative period,
struct GNUNET_TIME_Relative duration)
{
- struct TrafficGenerator * tg;
- tg = NULL;
+ struct TrafficGenerator *tg;
if (NULL != dest->tg)
{
@@ -318,10 +320,10 @@
return tg;
}
+
void
GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg)
{
-
GNUNET_CONTAINER_DLL_remove (tg_head, tg_tail, tg);
tg->dest->tg = NULL;
@@ -332,23 +334,24 @@
}
if (top->test_core)
{
- if (NULL != tg->dest->cth)
- {
- GNUNET_CORE_notify_transmit_ready_cancel (tg->dest->cth);
- tg->dest->cth = NULL;
- }
+ if (NULL != tg->dest->cth)
+ {
+ GNUNET_CORE_notify_transmit_ready_cancel (tg->dest->cth);
+ tg->dest->cth = NULL;
+ }
}
else
{
- if (NULL != tg->dest->tth)
- {
- GNUNET_TRANSPORT_notify_transmit_ready_cancel (tg->dest->tth);
- tg->dest->tth = NULL;
- }
+ if (NULL != tg->dest->tth)
+ {
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel (tg->dest->tth);
+ tg->dest->tth = NULL;
+ }
}
GNUNET_free (tg);
}
+
/**
* Stop all traffic generators
*/
Modified: gnunet/src/core/gnunet-service-core_neighbours.c
===================================================================
--- gnunet/src/core/gnunet-service-core_neighbours.c 2014-02-02 17:25:33 UTC
(rev 32152)
+++ gnunet/src/core/gnunet-service-core_neighbours.c 2014-02-02 17:38:22 UTC
(rev 32153)
@@ -275,7 +275,7 @@
(unsigned int) m->size, GNUNET_i2s (&n->peer),
GNUNET_STRINGS_relative_time_to_string
(GNUNET_TIME_absolute_get_remaining (m->deadline), GNUNET_NO));
n->th =
- GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size, 0,
+ GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size,
GNUNET_TIME_absolute_get_remaining
(m->deadline), &transmit_ready,
n);
Modified: gnunet/src/include/gnunet_transport_service.h
===================================================================
--- gnunet/src/include/gnunet_transport_service.h 2014-02-02 17:25:33 UTC
(rev 32152)
+++ gnunet/src/include/gnunet_transport_service.h 2014-02-02 17:38:22 UTC
(rev 32153)
@@ -41,7 +41,7 @@
/**
* Version number of the transport API.
*/
-#define GNUNET_TRANSPORT_VERSION 0x00000000
+#define GNUNET_TRANSPORT_VERSION 0x00000001
/**
@@ -451,6 +451,22 @@
/**
+ * Function called to notify a client about the connection begin ready
+ * to queue more data. @a buf will be NULL and @a size zero if the
+ * connection was closed for writing in the meantime.
+ *
+ * @param cls closure
+ * @param size number of bytes available in @a buf
+ * @param buf where the callee should write the message
+ * @return number of bytes written to @a buf
+ */
+typedef size_t
+(*GNUNET_TRANSPORT_TransmitReadyNotify) (void *cls,
+ size_t size,
+ void *buf);
+
+
+/**
* Check if we could queue a message of the given size for
* transmission. The transport service will take both its internal
* buffers and bandwidth limits imposed by the other peer into
@@ -459,7 +475,6 @@
* @param handle connection to transport service
* @param target who should receive the message
* @param size how big is the message we want to transmit?
- * @param priority how important is the message? @deprecated - remove?
* @param timeout after how long should we give up (and call
* notify with buf NULL and size 0)?
* @param notify function to call when we are ready to
@@ -473,9 +488,8 @@
GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
const struct GNUNET_PeerIdentity
*target,
size_t size,
- uint32_t priority,
struct GNUNET_TIME_Relative timeout,
- GNUNET_CONNECTION_TransmitReadyNotify
notify,
+ GNUNET_TRANSPORT_TransmitReadyNotify
notify,
void *notify_cls);
Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c 2014-02-02 17:25:33 UTC (rev
32152)
+++ gnunet/src/transport/gnunet-transport.c 2014-02-02 17:38:22 UTC (rev
32153)
@@ -714,8 +714,10 @@
m->type = ntohs (GNUNET_MESSAGE_TYPE_DUMMY);
memset (&m[1], 52, size - sizeof(struct GNUNET_MessageHeader));
traffic_sent += size;
- th = GNUNET_TRANSPORT_notify_transmit_ready (handle, &pid, BLOCKSIZE * 1024,
- 0, GNUNET_TIME_UNIT_FOREVER_REL, &transmit_data, NULL );
+ th = GNUNET_TRANSPORT_notify_transmit_ready (handle, &pid,
+ BLOCKSIZE * 1024,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &transmit_data, NULL );
if (verbosity > 0)
FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size,
GNUNET_i2s (&pid));
@@ -767,8 +769,10 @@
start_time = GNUNET_TIME_absolute_get ();
if (NULL == th)
th = GNUNET_TRANSPORT_notify_transmit_ready (handle, peer,
- BLOCKSIZE * 1024, 0, GNUNET_TIME_UNIT_FOREVER_REL, &transmit_data,
- NULL );
+ BLOCKSIZE * 1024,
+
GNUNET_TIME_UNIT_FOREVER_REL,
+ &transmit_data,
+ NULL);
else
GNUNET_break(0);
return;
Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c 2014-02-02 17:25:33 UTC
(rev 32152)
+++ gnunet/src/transport/test_quota_compliance.c 2014-02-02 17:38:22 UTC
(rev 32153)
@@ -336,7 +336,7 @@
if (n < TOTAL_MSGS)
{
if (th == NULL)
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
TIMEOUT_TRANSMIT,
¬ify_ready, NULL);
msg_scheduled = n;
@@ -384,7 +384,7 @@
sendtask ()
{
start_time = GNUNET_TIME_absolute_get ();
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
TIMEOUT_TRANSMIT, ¬ify_ready,
NULL);
}
Modified: gnunet/src/transport/test_transport_api.c
===================================================================
--- gnunet/src/transport/test_transport_api.c 2014-02-02 17:25:33 UTC (rev
32152)
+++ gnunet/src/transport/test_transport_api.c 2014-02-02 17:38:22 UTC (rev
32153)
@@ -238,7 +238,7 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
s_sending = GNUNET_YES;
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_bidirectional_connect.c
===================================================================
--- gnunet/src/transport/test_transport_api_bidirectional_connect.c
2014-02-02 17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_bidirectional_connect.c
2014-02-02 17:38:22 UTC (rev 32153)
@@ -93,6 +93,7 @@
GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
}
+
static void
end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
@@ -216,7 +217,7 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_blacklisting.c
===================================================================
--- gnunet/src/transport/test_transport_api_blacklisting.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_blacklisting.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -268,11 +268,13 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
+ TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
+
static void
notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
Modified: gnunet/src/transport/test_transport_api_disconnect.c
===================================================================
--- gnunet/src/transport/test_transport_api_disconnect.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_disconnect.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -261,7 +261,7 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_limited_sockets.c
===================================================================
--- gnunet/src/transport/test_transport_api_limited_sockets.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_limited_sockets.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -202,10 +202,11 @@
if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
- th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, 0,
TIMEOUT,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, TIMEOUT,
¬ify_ready, &p1);
}
+
static void
testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
{
Modified: gnunet/src/transport/test_transport_api_manipulation_cfg.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_cfg.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_manipulation_cfg.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -214,7 +214,7 @@
s_sending = GNUNET_YES;
start_request = GNUNET_TIME_absolute_get();
- th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT,
¬ify_request_ready,
p2);
}
@@ -274,7 +274,7 @@
s_sending = GNUNET_YES;
start_response = GNUNET_TIME_absolute_get();
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT,
¬ify_response_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
2014-02-02 17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
2014-02-02 17:38:22 UTC (rev 32153)
@@ -304,7 +304,7 @@
}
s_sending = GNUNET_YES;
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
2014-02-02 17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
2014-02-02 17:38:22 UTC (rev 32153)
@@ -304,7 +304,7 @@
}
s_sending = GNUNET_YES;
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_monitoring.c
===================================================================
--- gnunet/src/transport/test_transport_api_monitoring.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_monitoring.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -270,12 +270,14 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
s_sending = GNUNET_YES;
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
-static void done ()
+
+static void
+done ()
{
if ((GNUNET_YES == p1_c) && (GNUNET_YES == p2_c) && p1_c_notify &&
p2_c_notify)
{
Modified: gnunet/src/transport/test_transport_api_monitoring_validation.c
===================================================================
--- gnunet/src/transport/test_transport_api_monitoring_validation.c
2014-02-02 17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_monitoring_validation.c
2014-02-02 17:38:22 UTC (rev 32153)
@@ -281,12 +281,14 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
s_sending = GNUNET_YES;
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id,
TEST_MESSAGE_SIZE,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
-static void done ()
+
+static void
+done ()
{
if ((GNUNET_YES == p1_c) && (GNUNET_YES == p2_c) && p1_c_notify &&
p2_c_notify)
{
Modified: gnunet/src/transport/test_transport_api_reliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_reliability.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_reliability.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -327,7 +327,7 @@
if (n < TOTAL_MSGS)
{
if (th == NULL)
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
TIMEOUT_TRANSMIT,
¬ify_ready, NULL);
msg_scheduled = n;
@@ -375,7 +375,7 @@
sendtask ()
{
start_time = GNUNET_TIME_absolute_get ();
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
TIMEOUT_TRANSMIT, ¬ify_ready,
NULL);
}
Modified: gnunet/src/transport/test_transport_api_restart_1peer.c
===================================================================
--- gnunet/src/transport/test_transport_api_restart_1peer.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_restart_1peer.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -273,7 +273,7 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_restart_2peers.c
===================================================================
--- gnunet/src/transport/test_transport_api_restart_2peers.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_restart_2peers.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -270,7 +270,7 @@
p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
GNUNET_free (receiver_s);
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
TIMEOUT_TRANSMIT, ¬ify_ready,
p1);
}
Modified: gnunet/src/transport/test_transport_api_unreliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_unreliability.c 2014-02-02
17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_unreliability.c 2014-02-02
17:38:22 UTC (rev 32153)
@@ -412,7 +412,7 @@
while ((size - ret >= s) && (n < TOTAL_MSGS));
if (n < TOTAL_MSGS)
{
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
TIMEOUT_TRANSMIT,
¬ify_ready, NULL);
msg_scheduled = n;
@@ -460,7 +460,7 @@
start_time = GNUNET_TIME_absolute_get ();
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting to send %u messages\n",
TOTAL_MSGS);
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
TIMEOUT_TRANSMIT, ¬ify_ready,
NULL);
}
Modified: gnunet/src/transport/test_transport_api_unreliability_constant.c
===================================================================
--- gnunet/src/transport/test_transport_api_unreliability_constant.c
2014-02-02 17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/test_transport_api_unreliability_constant.c
2014-02-02 17:38:22 UTC (rev 32153)
@@ -333,7 +333,7 @@
while (size - ret >= s);
if (n < TOTAL_MSGS)
{
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
TIMEOUT_TRANSMIT,
¬ify_ready, NULL);
msg_scheduled = n;
@@ -380,7 +380,7 @@
sendtask ()
{
start_time = GNUNET_TIME_absolute_get ();
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
0,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
TIMEOUT_TRANSMIT, ¬ify_ready,
NULL);
}
Modified: gnunet/src/transport/transport.h
===================================================================
--- gnunet/src/transport/transport.h 2014-02-02 17:25:33 UTC (rev 32152)
+++ gnunet/src/transport/transport.h 2014-02-02 17:38:22 UTC (rev 32153)
@@ -285,14 +285,14 @@
{
/**
- * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND
+ * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_SEND
*/
struct GNUNET_MessageHeader header;
/**
- * Message priority.
+ * Always zero.
*/
- uint32_t priority GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
/**
* Allowed delay.
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2014-02-02 17:25:33 UTC (rev
32152)
+++ gnunet/src/transport/transport_api.c 2014-02-02 17:38:22 UTC (rev
32153)
@@ -68,7 +68,7 @@
* Function to call when notify_size bytes are available
* for transmission.
*/
- GNUNET_CONNECTION_TransmitReadyNotify notify;
+ GNUNET_TRANSPORT_TransmitReadyNotify notify;
/**
* Closure for notify.
@@ -91,11 +91,6 @@
*/
size_t notify_size;
- /**
- * How important is this message? Not used for control messages.
- */
- uint32_t priority;
-
};
@@ -820,7 +815,7 @@
GNUNET_SERVER_MAX_MESSAGE_SIZE);
obm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND);
obm.header.size = htons (mret + sizeof (struct OutboundMessage));
- obm.priority = htonl (th->priority);
+ obm.reserved = htonl (0);
obm.timeout =
GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining
(th->timeout));
@@ -888,7 +883,8 @@
return; /* no pending messages */
size = n->th->notify_size + sizeof (struct OutboundMessage);
}
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Calling notify_transmit_ready\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Calling notify_transmit_ready\n");
h->cth =
GNUNET_CLIENT_notify_transmit_ready (h->client, size,
GNUNET_TIME_UNIT_FOREVER_REL,
@@ -947,7 +943,7 @@
*/
static struct GNUNET_TRANSPORT_TransmitHandle *
schedule_control_transmit (struct GNUNET_TRANSPORT_Handle *h, size_t size,
- GNUNET_CONNECTION_TransmitReadyNotify notify,
+ GNUNET_TRANSPORT_TransmitReadyNotify notify,
void *notify_cls)
{
struct GNUNET_TRANSPORT_TransmitHandle *th;
@@ -1035,7 +1031,8 @@
h->client = GNUNET_CLIENT_connect ("transport", h->cfg);
GNUNET_assert (NULL != h->client);
- schedule_control_transmit (h, sizeof (struct StartMessage), &send_start, h);
+ schedule_control_transmit (h, sizeof (struct StartMessage),
+ &send_start, h);
}
@@ -1332,7 +1329,8 @@
msg->ats_count = htons (ats_count);
msg->peer = (*peer);
memcpy (&msg[1], ats, ats_count * sizeof (struct GNUNET_ATS_Information));
- schedule_control_transmit (handle, len, &send_metric, msg);
+ schedule_control_transmit (handle, len,
+ &send_metric, msg);
}
@@ -1385,7 +1383,8 @@
ohh->cont = cont;
ohh->cls = cls;
ohh->msg = msg;
- ohh->tth = schedule_control_transmit (handle, size, &send_hello, ohh);
+ ohh->tth = schedule_control_transmit (handle, size,
+ &send_hello, ohh);
GNUNET_CONTAINER_DLL_insert (handle->oh_head, handle->oh_tail, ohh);
return ohh;
}
@@ -1542,7 +1541,7 @@
ret->ready_heap =
GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
schedule_control_transmit (ret, sizeof (struct StartMessage),
- &send_start, ret);
+ &send_start, ret);
return ret;
}
@@ -1594,7 +1593,6 @@
* @param handle connection to transport service
* @param target who should receive the message
* @param size how big is the message we want to transmit?
- * @param priority how important is the message?
* @param timeout after how long should we give up (and call
* notify with buf NULL and size 0)?
* @param notify function to call when we are ready to
@@ -1607,9 +1605,9 @@
struct GNUNET_TRANSPORT_TransmitHandle *
GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
const struct GNUNET_PeerIdentity
*target,
- size_t size, uint32_t priority,
+ size_t size,
struct GNUNET_TIME_Relative timeout,
- GNUNET_CONNECTION_TransmitReadyNotify
notify,
+ GNUNET_TRANSPORT_TransmitReadyNotify
notify,
void *notify_cls)
{
struct Neighbour *n;
@@ -1637,7 +1635,6 @@
th->notify_cls = notify_cls;
th->timeout = GNUNET_TIME_relative_to_absolute (timeout);
th->notify_size = size;
- th->priority = priority;
n->th = th;
/* calculate when our transmission should be ready */
delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, size +
n->traffic_overhead);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32153 - in gnunet/src: ats-tests core include transport,
gnunet <=