[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34929 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34929 - gnunet/src/ats |
Date: |
Sun, 18 Jan 2015 13:57:26 +0100 |
Author: grothoff
Date: 2015-01-18 13:57:26 +0100 (Sun, 18 Jan 2015)
New Revision: 34929
Modified:
gnunet/src/ats/test_ats_solver_request_and_delete_address.c
Log:
-test cleanup
Modified: gnunet/src/ats/test_ats_solver_request_and_delete_address.c
===================================================================
--- gnunet/src/ats/test_ats_solver_request_and_delete_address.c 2015-01-18
12:24:15 UTC (rev 34928)
+++ gnunet/src/ats/test_ats_solver_request_and_delete_address.c 2015-01-18
12:57:26 UTC (rev 34929)
@@ -43,7 +43,7 @@
/**
* Statistics handle
*/
-struct GNUNET_STATISTICS_Handle *stats;
+static struct GNUNET_STATISTICS_Handle *stats;
/**
* Scheduling handle
@@ -68,7 +68,7 @@
/**
* HELLO address
*/
-struct GNUNET_HELLO_Address test_hello_address;
+static struct GNUNET_HELLO_Address test_hello_address;
/**
* Session
@@ -88,10 +88,12 @@
static int address_deleted = GNUNET_NO;
+
static int
stat_cb(void *cls, const char *subsystem, const char *name, uint64_t value,
int is_persistent);
+
static void
end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
@@ -125,11 +127,11 @@
end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
die_task = NULL;
-
- end ( NULL, NULL);
+ end (NULL, NULL);
ret = GNUNET_SYSERR;
}
+
static void
address_suggest_cb (void *cls,
const struct GNUNET_PeerIdentity *peer,
@@ -140,7 +142,6 @@
const struct GNUNET_ATS_Information *atsi,
uint32_t ats_count)
{
-
if (GNUNET_NO == address_deleted)
{
/* Expected address suggestion */
@@ -154,7 +155,6 @@
GNUNET_i2s (&address->peer));
address_deleted = GNUNET_YES;
GNUNET_ATS_address_destroyed (sched_ats, &test_hello_address, NULL);
-
}
else
{
@@ -173,7 +173,6 @@
GNUNET_SCHEDULER_add_now (&end, NULL);
}
}
- return;
}
@@ -183,8 +182,11 @@
int is_persistent)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ATS statistics: `%s' `%s' %llu\n",
- subsystem,name, value);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "ATS statistics: `%s' `%s' %llu\n",
+ subsystem,
+ name,
+ value);
if (GNUNET_NO == address_deleted)
GNUNET_ATS_suggest_address (sched_ats, &p.id);
return GNUNET_OK;
@@ -192,8 +194,9 @@
static void
-run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
- struct GNUNET_TESTING_Peer *peer)
+run (void *cls,
+ const struct GNUNET_CONFIGURATION_Handle *mycfg,
+ struct GNUNET_TESTING_Peer *peer)
{
die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
stats = GNUNET_STATISTICS_create ("ats", mycfg);
@@ -231,8 +234,8 @@
/* Adding address */
GNUNET_ATS_address_add (sched_ats, &test_hello_address,
- NULL, test_ats_info, test_ats_count);
-
+ NULL,
+ test_ats_info, test_ats_count);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34929 - gnunet/src/ats,
gnunet <=