-simplifying core API (#2400)
[oweals/gnunet.git] / src / dv / test_transport_api_dv.c
index 435bb2a608f6fce5d576daec002e8a9972a6a19f..b24bfbf3108fefc93d7163d90a09c18c753756b4 100644 (file)
@@ -274,8 +274,8 @@ finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 #endif
   if (dotOutFile != NULL)
   {
-    fclose (dotOutFile);
     FPRINTF (dotOutFile, "%s",  "}");
+    FCLOSE (dotOutFile);
   }
 
   ok = 0;
@@ -383,7 +383,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (dotOutFile != NULL)
   {
     FPRINTF (dotOutFile, "%s",  "}");
-    fclose (dotOutFile);
+    FCLOSE (dotOutFile);
   }
 }
 
@@ -601,7 +601,7 @@ connect_notify_peer1 (void *cls, const struct GNUNET_PeerIdentity *peer,
      * Connect to the receiving peer
      */
     pos->peer2handle =
-        GNUNET_CORE_connect (pos->peer2->cfg, 1, pos, &init_notify_peer2,
+        GNUNET_CORE_connect (pos->peer2->cfg, pos, &init_notify_peer2,
                              &connect_notify_peer2, NULL, NULL, GNUNET_YES,
                              NULL, GNUNET_YES, handlers);
   }
@@ -651,7 +651,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
    * Connect to the sending peer
    */
   pos->peer1handle =
-      GNUNET_CORE_connect (pos->peer1->cfg, 1, pos, &init_notify_peer1,
+      GNUNET_CORE_connect (pos->peer1->cfg, pos, &init_notify_peer1,
                            &connect_notify_peer1, NULL, NULL, GNUNET_NO, NULL,
                            GNUNET_NO, no_handlers);
 
@@ -944,7 +944,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
 
   new_peer = GNUNET_malloc (sizeof (struct PeerContext));
   new_peer->peer_handle =
-      GNUNET_CORE_connect (cfg, 1, d, NULL, &all_connect_handler, NULL, NULL,
+      GNUNET_CORE_connect (cfg, d, NULL, &all_connect_handler, NULL, NULL,
                            GNUNET_NO, NULL, GNUNET_NO, no_handlers);
   new_peer->daemon = d;
   new_peer->next = all_peers;
@@ -1127,7 +1127,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                              "connect_topology_option_modifier",
                                              &connect_topology_option_modifier_string))
   {
-    if (sscanf
+    if (SSCANF
         (connect_topology_option_modifier_string, "%lf",
          &connect_topology_option_modifier) != 1)
     {