+ GNUNET_assert (NULL == emsg);
+ GNUNET_assert (op == op_);
+ switch (setup_state)
+ {
+ case PEER1_GET_IDENTITY:
+ memcpy (&peer1.our_id, pinfo->result.id,
+ sizeof (struct GNUNET_PeerIdentity));
+ GNUNET_TESTBED_operation_done (op);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer 1 id: %s\n", GNUNET_i2s
+ (&peer1.our_id));
+ op = GNUNET_TESTBED_peer_get_information (peer2.peer,
+ GNUNET_TESTBED_PIT_IDENTITY,
+ &peerinfo_cb, NULL);
+ setup_state = PEER2_GET_IDENTITY;
+ break;
+ case PEER2_GET_IDENTITY:
+ memcpy (&peer2.our_id, pinfo->result.id,
+ sizeof (struct GNUNET_PeerIdentity));
+ GNUNET_TESTBED_operation_done (op);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer 2 id: %s\n", GNUNET_i2s
+ (&peer2.our_id));
+ peer2.op = GNUNET_TESTBED_service_connect (&peer2, peer2.peer, "stream",
+ NULL, NULL,
+ stream_ca, stream_da, &peer2);
+ setup_state = PEER2_STREAM_CONNECT;
+ break;
+ default:
+ GNUNET_assert (0);
+ }
+}