aboutsummaryrefslogtreecommitdiff
path: root/src/common/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/helper.c')
-rw-r--r--src/common/helper.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/common/helper.c b/src/common/helper.c
index 52dfefe3..177ac952 100644
--- a/src/common/helper.c
+++ b/src/common/helper.c
@@ -462,8 +462,11 @@ GNUNET_GTK_run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg)
462 } 462 }
463 else 463 else
464 { 464 {
465 i = 0;
465 while (GNUNET_SYSERR == GNUNET_semaphore_down (cls.sig, GNUNET_NO)) 466 while (GNUNET_SYSERR == GNUNET_semaphore_down (cls.sig, GNUNET_NO))
466 { 467 {
468 if (i == -1)
469 GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
467 GNUNET_mutex_lock (sclock); 470 GNUNET_mutex_lock (sclock);
468 if (pscCount > 0) 471 if (pscCount > 0)
469 { 472 {
@@ -476,11 +479,6 @@ GNUNET_GTK_run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg)
476 i = -1; 479 i = -1;
477 } 480 }
478 GNUNET_mutex_unlock (sclock); 481 GNUNET_mutex_unlock (sclock);
479 if ((i == -1)
480 && (GNUNET_OK != GNUNET_semaphore_down (cls.sig, GNUNET_NO)))
481 {
482 GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
483 }
484 } 482 }
485 } 483 }
486 GNUNET_thread_join (doneThread, &retval); 484 GNUNET_thread_join (doneThread, &retval);