+ }
+
+ /* If offline, restart with certain probability */
+ else if (GNUNET_NO == rps_peers[j].online)
+ {
+ prob = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ UINT32_MAX);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%u. selected peer (%u: %s) is offline.\n",
+ i,
+ j,
+ GNUNET_i2s (rps_peers[j].peer_id));
+ if (prob < .66 * UINT32_MAX)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%s goes online\n",
+ GNUNET_i2s (rps_peers[j].peer_id));
+
+ entry = make_oplist_entry ();
+ entry->delta = 1;
+ entry->index = j;
+ entry->op = GNUNET_TESTBED_peer_manage_service (NULL,
+ testbed_peers[j],
+ "rps",
+ &churn_cb,
+ entry,
+ 1);
+ }
+ }