char *cfg_file_p2;
#if VERBOSE
-#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
+#define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
#else
#define OKPP do { ok++; } while (0)
#endif
"Press <q> to quit or <1> to send from p1 to p2, <2> to send from p2 to p1, <enter> repeat\n");
read:
- t = getchar();
+ t = getchar ();
if (t == '1')
{
- th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, 0, TIMEOUT,
- ¬ify_ready, p1);
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, 0,
+ TIMEOUT, ¬ify_ready, p1);
return;
}
if (t == '2')
{
- th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0, TIMEOUT,
- ¬ify_ready, p2);
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0,
+ TIMEOUT, ¬ify_ready, p2);
return;
}
if (t == 'q')
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Exiting %c!\n", t);
- GNUNET_SCHEDULER_add_now(&end, NULL);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Exiting %c!\n", t);
+ GNUNET_SCHEDULER_add_now (&end, NULL);
return;
}
goto read;
static void
notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *ats,
- uint32_t ats_count)
+ const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received message of type %d from peer %s!\n",
if ((MTYPE == ntohs (message->type)) &&
(sizeof (struct GNUNET_MessageHeader) == ntohs (message->size)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Successfully received message\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Successfully received message\n");
send_task = GNUNET_SCHEDULER_add_now (&sendtask, NULL);
}
static void
notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_TRANSPORT_ATS_Information *ats,
- uint32_t ats_count)
+ const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
GNUNET_i2s (peer), cls);
GNUNET_DISK_directory_remove (p->servicehome);
/*
* p->arm_proc =
- * GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+ * GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
* "gnunet-service-arm", "-c", cfgname,
* #if VERBOSE_PEERS
* "-L", "DEBUG",
testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
{
cc = NULL;
- char *p1_c = strdup (GNUNET_i2s (&p1->id));
+ char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peers connected: %s <-> %s\n", p1_c,
GNUNET_i2s (&p2->id));
cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb,
NULL);
+
}
if (argc < 3)
{
- fprintf (stderr,
+ FPRINTF (stderr,
"usage gnunet-transport-connect-running-peers <cfg_peer1> <cfg_peer2>\n");
return -1;
}