aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-22 21:59:27 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-22 21:59:27 +0000
commitf44c0036572d5557d2496748a4190a61e40e61ff (patch)
treebceb908e8542883ed246f96b4c619c0c49a06782 /src/testing
parent9d87d51965287d83ee332b8c50baff95bd62649a (diff)
downloadgnunet-f44c0036572d5557d2496748a4190a61e40e61ff.tar.gz
gnunet-f44c0036572d5557d2496748a4190a61e40e61ff.zip
replacing 0-terminated atsi-array with array+length in core API (and the core-connect IPC)
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_testing_topology.c7
-rw-r--r--src/testing/testing.c8
-rw-r--r--src/testing/testing_group.c5
3 files changed, 14 insertions, 6 deletions
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index b83a8cf3c..e563f4d64 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -348,7 +348,8 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
348static int 348static int
349process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, 349process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
350 const struct GNUNET_MessageHeader *message, 350 const struct GNUNET_MessageHeader *message,
351 const struct GNUNET_ATS_Information *atsi) 351 const struct GNUNET_ATS_Information *atsi,
352 unsigned int atsi_count)
352{ 353{
353 char *dotOutFileNameFinished; 354 char *dotOutFileNameFinished;
354 FILE *dotOutFileFinished; 355 FILE *dotOutFileFinished;
@@ -537,10 +538,12 @@ init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
537 * @param cls closure 538 * @param cls closure
538 * @param peer peer identity this notification is about 539 * @param peer peer identity this notification is about
539 * @param atsi performance data for the connection 540 * @param atsi performance data for the connection
541 * @param atsi_count number of records in 'atsi'
540 */ 542 */
541static void 543static void
542connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer, 544connect_notify_peers (void *cls, const struct GNUNET_PeerIdentity *peer,
543 const struct GNUNET_ATS_Information *atsi) 545 const struct GNUNET_ATS_Information *atsi,
546 unsigned int atsi_count)
544{ 547{
545 struct TestMessageContext *pos = cls; 548 struct TestMessageContext *pos = cls;
546 549
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 1798a1af6..e81a92fb5 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1882,11 +1882,13 @@ notify_connect_result (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1882 * @param cls our "struct GNUNET_TESTING_ConnectContext" 1882 * @param cls our "struct GNUNET_TESTING_ConnectContext"
1883 * @param peer identity of the peer that has connected 1883 * @param peer identity of the peer that has connected
1884 * @param atsi performance information 1884 * @param atsi performance information
1885 * @param atsi_count number of records in 'atsi'
1885 * 1886 *
1886 */ 1887 */
1887static void 1888static void
1888connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, 1889connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
1889 const struct GNUNET_ATS_Information *atsi) 1890 const struct GNUNET_ATS_Information *atsi,
1891 unsigned int atsi_count)
1890{ 1892{
1891 struct GNUNET_TESTING_ConnectContext *ctx = cls; 1893 struct GNUNET_TESTING_ConnectContext *ctx = cls;
1892 1894
@@ -2080,11 +2082,13 @@ reattempt_daemons_connect (void *cls,
2080 * @param peer identity of the peer that has connected, 2082 * @param peer identity of the peer that has connected,
2081 * NULL when iteration has finished 2083 * NULL when iteration has finished
2082 * @param atsi performance information 2084 * @param atsi performance information
2085 * @param atsi_count number of records in 'atsi'
2083 * 2086 *
2084 */ 2087 */
2085static void 2088static void
2086core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer, 2089core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer,
2087 const struct GNUNET_ATS_Information *atsi) 2090 const struct GNUNET_ATS_Information *atsi,
2091 unsigned int atsi_count)
2088{ 2092{
2089 struct GNUNET_TESTING_ConnectContext *ctx = cls; 2093 struct GNUNET_TESTING_ConnectContext *ctx = cls;
2090 2094
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index a2c68c93c..04c2cfd00 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -4877,7 +4877,8 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
4877 */ 4877 */
4878static void 4878static void
4879internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *peer, 4879internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
4880 const struct GNUNET_ATS_Information *atsi) 4880 const struct GNUNET_ATS_Information *atsi,
4881 unsigned int atsi_count)
4881{ 4882{
4882 struct CoreContext *core_ctx = cls; 4883 struct CoreContext *core_ctx = cls;
4883 struct TopologyIterateContext *iter_ctx = core_ctx->iter_context; 4884 struct TopologyIterateContext *iter_ctx = core_ctx->iter_context;
@@ -4941,7 +4942,7 @@ schedule_get_topology (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
4941 &internal_topology_callback, core_context)) 4942 &internal_topology_callback, core_context))
4942 { 4943 {
4943 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Topology iteration failed.\n"); 4944 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Topology iteration failed.\n");
4944 internal_topology_callback (core_context, NULL, NULL); 4945 internal_topology_callback (core_context, NULL, NULL, 0);
4945 } 4946 }
4946 } 4947 }
4947} 4948}