diff options
Diffstat (limited to 'dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff')
-rw-r--r-- | dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff b/dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff new file mode 100644 index 000000000000..e047b2b1d5d5 --- /dev/null +++ b/dev-libs/libtranslate/files/libtranslate-0.99-condfix.diff @@ -0,0 +1,39 @@ +diff -Naur libtranslate-0.99.orig/src/translate-session.c libtranslate-0.99/src/translate-session.c +--- libtranslate-0.99.orig/src/translate-session.c 2005-01-17 17:45:35.000000000 +0100 ++++ libtranslate-0.99/src/translate-session.c 2007-09-02 16:43:47.000000000 +0200 +@@ -703,7 +703,14 @@ + GError *tmp_err = NULL; + + g_mutex_lock(info->mutex); +- ret = info->err != NULL; ++ if (info->err) ++ { ++ ret = TRUE; ++ if (info->progress_cond) ++ g_cond_signal(info->progress_cond); ++ } ++ else ++ ret = FALSE; + g_mutex_unlock(info->mutex); + + if (ret) +@@ -728,6 +735,9 @@ + else + g_propagate_error(&info->err, tmp_err); + ++ if (info->progress_cond) ++ g_cond_signal(info->progress_cond); ++ + g_mutex_unlock(info->mutex); + + return; +@@ -759,6 +769,9 @@ + info->err = g_error_new(TRANSLATE_SESSION_ERROR, + TRANSLATE_SESSION_ERROR_NO_SERVICE, + _("no service could translate chunk")); ++ ++ if (info->progress_cond) ++ g_cond_signal(info->progress_cond); + } + + g_mutex_unlock(info->mutex); |