{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Testing new advertised hostlist if it is obtainable\n");
+ current_hostlist = hostlist_to_test;
return strdup(hostlist_to_test->hostlist_uri);
}
return;
}
+
/**
* Method updating hostlist statistics
*/
static void update_hostlist ( )
{
char *stat;
- if ( (use_preconfigured_list == GNUNET_NO) && ( NULL != current_hostlist ) )
+ if ( ((use_preconfigured_list == GNUNET_NO) && ( NULL != current_hostlist )) ||
+ ((testing_hostlist == GNUNET_YES) && ( NULL != current_hostlist )) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Updating hostlist statics for URI `%s'\n",current_hostlist->hostlist_uri );
GNUNET_asprintf (&stat,
gettext_noop("# advertised URI `%s' downloaded"),
current_hostlist->hostlist_uri);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Updating downloaded statics for URI to value\n" );
GNUNET_STATISTICS_update ( stats,
stat,
current_hostlist = NULL;
/* Alternating the usage of preconfigured and learned hostlists */
+ if (testing_hostlist == GNUNET_YES)
+ return;
+
if ( GNUNET_YES == learning)
{
if (use_preconfigured_list == GNUNET_YES)
_("Download of hostlist `%s' completed.\n"),
current_url);
download_successful = GNUNET_YES;
+ update_hostlist();
if (GNUNET_YES == testing_hostlist)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Adding successfully tested hostlist `%s' datastore.\n"),current_url);
insert_hostlist();
+ hostlist_to_test = NULL;
testing_hostlist = GNUNET_NO;
}
- update_hostlist();
}
clean_up ();
return;
#include "gnunet_resolver_service.h"
#include "gnunet_statistics_service.h"
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_YES
#define START_ARM GNUNET_YES
#define MAX_URL_LEN 1000
/**
* How long until wait until testcases fails
*/
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
#define CHECK_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
static int timeout;
uint64_t value,
int is_persistent)
{
- if ( (value == 1) && (learned_hostlist_downloaded == GNUNET_NO) )
+ if ( (value == 2) && (learned_hostlist_downloaded == GNUNET_NO) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Client has successfully downloaded advertised URI \n"));