aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-02-09 20:11:11 +0000
committerChristian Grothoff <christian@grothoff.org>2008-02-09 20:11:11 +0000
commitaccfec98e7191394d6e80144b86c6716fbfe41e2 (patch)
tree20ca2f83b1c67b57586fc769bcd71242433b2568
parentd66b5709b58552020cae1082f0ac853831c2f0e9 (diff)
downloadgnunet-gtk-accfec98e7191394d6e80144b86c6716fbfe41e2.tar.gz
gnunet-gtk-accfec98e7191394d6e80144b86c6716fbfe41e2.zip
fixing mantis 1311
-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);