-LRN: use blocking writes for scanner
authorChristian Grothoff <christian@grothoff.org>
Sat, 14 Jan 2012 23:18:23 +0000 (23:18 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 14 Jan 2012 23:18:23 +0000 (23:18 +0000)
src/fs/fs_dirmetascan.c

index ce76b03875cbabf99d2eefcb6c931020751a74ce..6af1863479745ad39582df9805c106ff0f66ec03 100644 (file)
@@ -355,7 +355,7 @@ write_progress (struct AddDirContext *adc, const char *filename,
   wr = 1;\r
   while ((wr > 0 || errno == EAGAIN) && total_write < sizeof (reason))\r
   {\r
-    wr = GNUNET_DISK_file_write (adc->progress_write,\r
+    wr = GNUNET_DISK_file_write_blocking (adc->progress_write,\r
       &((char *)&reason)[total_write], sizeof (reason) - total_write);\r
     if (wr > 0)\r
       total_write += wr;\r
@@ -370,7 +370,7 @@ write_progress (struct AddDirContext *adc, const char *filename,
   wr = 1;\r
   while ((wr > 0 || errno == EAGAIN) && total_write < sizeof (size_t))\r
   {\r
-    wr = GNUNET_DISK_file_write (adc->progress_write,\r
+    wr = GNUNET_DISK_file_write_blocking (adc->progress_write,\r
       &((char *)&filename_len)[total_write], sizeof (size_t) - total_write);\r
     if (wr > 0)\r
       total_write += wr;\r
@@ -383,7 +383,7 @@ write_progress (struct AddDirContext *adc, const char *filename,
     wr = 1;\r
     while ((wr > 0 || errno == EAGAIN) && total_write < filename_len)\r
     {\r
-      wr = GNUNET_DISK_file_write (adc->progress_write,\r
+      wr = GNUNET_DISK_file_write_blocking (adc->progress_write,\r
         &((char *)filename)[total_write], filename_len - total_write);\r
       if (wr > 0)\r
         total_write += wr;\r
@@ -394,7 +394,7 @@ write_progress (struct AddDirContext *adc, const char *filename,
     wr = 1;\r
     while ((wr > 0 || errno == EAGAIN) && total_write < sizeof (char))\r
     {\r
-      wr = GNUNET_DISK_file_write (adc->progress_write,\r
+      wr = GNUNET_DISK_file_write_blocking (adc->progress_write,\r
         &((char *)&is_directory)[total_write], sizeof (char) - total_write);\r
       if (wr > 0)\r
         total_write += wr;\r