aboutsummaryrefslogtreecommitdiff
path: root/src/fragmentation/test_fragmentation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-04 14:00:32 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-04 14:00:32 +0000
commit83b19539f4d322b43683f5838b72e9ec2c8e6073 (patch)
treed0ab9329fcbefe360d9d14e2ace21a6b3396dfe9 /src/fragmentation/test_fragmentation.c
parent28a2eb43281a1f08a67954f07beb9af3a9bc9a35 (diff)
downloadgnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.tar.gz
gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.zip
curly wars / auto-indentation
Diffstat (limited to 'src/fragmentation/test_fragmentation.c')
-rw-r--r--src/fragmentation/test_fragmentation.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c
index 8f0be87a5..1f7a1776a 100644
--- a/src/fragmentation/test_fragmentation.c
+++ b/src/fragmentation/test_fragmentation.c
@@ -65,8 +65,7 @@ static struct GNUNET_FRAGMENT_Context *frags[NUM_MSGS];
65static GNUNET_SCHEDULER_TaskIdentifier shutdown_task; 65static GNUNET_SCHEDULER_TaskIdentifier shutdown_task;
66 66
67static void 67static void
68do_shutdown (void *cls, 68do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
69 const struct GNUNET_SCHEDULER_TaskContext *tc)
70{ 69{
71 unsigned int i; 70 unsigned int i;
72 71
@@ -80,7 +79,7 @@ do_shutdown (void *cls,
80 continue; 79 continue;
81 GNUNET_FRAGMENT_context_destroy (frags[i]); 80 GNUNET_FRAGMENT_context_destroy (frags[i]);
82 frags[i] = NULL; 81 frags[i] = NULL;
83 } 82 }
84} 83}
85 84
86 85
@@ -103,8 +102,7 @@ proc_msgs (void *cls, const struct GNUNET_MessageHeader *hdr)
103 fprintf (stderr, "."); 102 fprintf (stderr, ".");
104#endif 103#endif
105 /* tolerate 10% loss, i.e. due to duplicate fragment IDs */ 104 /* tolerate 10% loss, i.e. due to duplicate fragment IDs */
106 if ( (total >= NUM_MSGS - (NUM_MSGS / 10)) && 105 if ((total >= NUM_MSGS - (NUM_MSGS / 10)) && (ret != 0))
107 (ret != 0) )
108 { 106 {
109 if (GNUNET_SCHEDULER_NO_TASK == shutdown_task) 107 if (GNUNET_SCHEDULER_NO_TASK == shutdown_task)
110 shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); 108 shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);