-static void
-connect_handler (void *cls,
- const struct
- GNUNET_PeerIdentity * peer,
- struct GNUNET_TIME_Relative latency,
- uint32_t distance)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "A new peer connected, notifying client and server\n");
+ incoming = (const struct GNUNET_MessageHeader *) message;
+ recv_uri = (char*) &incoming[1];
+ if ( 0 == strcmp( expected_uri, recv_uri ) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Recieved hostlist advertisement with URI `%s'as expected\n", recv_uri);
+ adv_arrived = GNUNET_YES;
+ }
+ else
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected URI `%s' and recieved URI `%s' differ\n", expected_uri, recv_uri);
+ GNUNET_free ( expected_uri );
+ GNUNET_free ( hostname );
+ shutdown_testcase();
+ return GNUNET_OK;