-#if ENABLE_LL
-#define ISLANDNAME_SIZE 4
-static void
-parse_islands (struct RunContext *rc)
-{
- char island_id[ISLANDNAME_SIZE];
- struct GNUNET_TESTBED_Host *host;
- struct Island *island;
- const char *hostname;
- unsigned int nhost;
-
- DEBUG ("Parsing for islands\n");
- memset (island_id, 0, ISLANDNAME_SIZE);
- island = NULL;
- for (nhost = 0; nhost < rc->num_hosts; nhost++)
- {
- host = rc->hosts[nhost];
- hostname = GNUNET_TESTBED_host_get_hostname (host);
- GNUNET_assert (NULL != hostname);
- if (NULL == island)
- {
- strncpy (island_id, hostname, ISLANDNAME_SIZE - 1);
- island = GNUNET_malloc (sizeof (struct Island));
- }
- if (0 == strncmp (island_id, hostname, ISLANDNAME_SIZE - 1))
- {
- GNUNET_array_append (island->hosts, island->nhosts, host);
- continue;
- }
- DEBUG ("Adding island `%s' with %u hosts\n", island_id, island->nhosts);
- GNUNET_array_append (rc->islands, rc->nislands, island);
- island = NULL;
- }
- if (NULL != island)
- {
- DEBUG ("Adding island `%s' with %u hosts\n", island_id, island->nhosts);
- GNUNET_array_append (rc->islands, rc->nislands, island);
- }
- DEBUG ("Total islands parsed: %u\n", rc->nislands);
-}
-#endif
-
-