testing if flushing files corrects a problem
authorNathan S. Evans <evans@in.tum.de>
Fri, 12 Nov 2010 13:33:43 +0000 (13:33 +0000)
committerNathan S. Evans <evans@in.tum.de>
Fri, 12 Nov 2010 13:33:43 +0000 (13:33 +0000)
src/dht/gnunet-service-dht.c
src/dht/plugin_dhtlog_mysql_dump_load.c

index b07c25b29602bb5cccb4def848ae0b6144defb6a..9e56e99b2d10d82dd6ba5f6710afa5c713d75237 100644 (file)
@@ -4425,9 +4425,9 @@ core_init (void *cls,
   if (server == NULL)
     {
 #if DEBUG_DHT
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "%s: Connection to core FAILED!\n", "dht",
-              GNUNET_i2s (identity));
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "%s: Connection to core FAILED!\n", "dht",
+                  GNUNET_i2s (identity));
 #endif
       GNUNET_SCHEDULER_cancel (cleanup_task);
       GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
index 45e0e1afbd0d33d1ed4e2152191bdb3d3b61d7da..97c4f3e793451554548489f88f5e1102410416ad 100644 (file)
@@ -326,7 +326,7 @@ add_node (unsigned long long *nodeuid, struct GNUNET_PeerIdentity * node)
     return GNUNET_SYSERR;
 
   ret = fprintf(node_outfile, "TRIALUID\t%s\n", GNUNET_h2s_full(&node->hashPubKey));
-
+  fflush(node_outfile);
   if (ret >= 0)
     return GNUNET_OK;
   return GNUNET_SYSERR;
@@ -348,7 +348,7 @@ update_trials (unsigned int gets_succeeded)
     return GNUNET_SYSERR;
 
   ret = fprintf(outfile, "update trials set endtime=\"%s\", gets_succeeded=%u where trialuid = @temp_trial;\n", get_sql_time(), gets_succeeded);
-
+  fflush(node_outfile);
   if (ret >= 0)
     return GNUNET_OK;
   else
@@ -373,7 +373,7 @@ set_malicious (struct GNUNET_PeerIdentity *peer)
     return GNUNET_SYSERR;
 
   ret = fprintf(outfile, "update nodes set malicious_dropper = 1 where trialuid = @temp_trial and nodeid = \"%s\";\n", GNUNET_h2s_full(&peer->hashPubKey));
-
+  fflush(node_outfile);
   if (ret >= 0)
     return GNUNET_OK;
   else
@@ -397,7 +397,7 @@ add_connections (unsigned int totalConnections)
     return GNUNET_SYSERR;
 
   ret = fprintf(outfile, "update trials set totalConnections = %u where trialuid = @temp_trial;\n", totalConnections);
-
+  fflush(node_outfile);
   if (ret >= 0)
     return GNUNET_OK;
   else