From 60bd665e74cfeeaf70882173a0dd56c883e2014a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 12 Mar 2021 03:55:34 +0100 Subject: Added to git tree --- .../libtranslate/libtranslate-ds4-condfix.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 patches/libtranslate/libtranslate-ds4-condfix.patch (limited to 'patches/libtranslate/libtranslate-ds4-condfix.patch') diff --git a/patches/libtranslate/libtranslate-ds4-condfix.patch b/patches/libtranslate/libtranslate-ds4-condfix.patch new file mode 100644 index 0000000..9915a80 --- /dev/null +++ b/patches/libtranslate/libtranslate-ds4-condfix.patch @@ -0,0 +1,38 @@ +--- libtranslate-0.99/src/translate-session.c.orig Mon Apr 11 22:44:53 2005 ++++ libtranslate-0.99/src/translate-session.c Mon Apr 11 22:51:48 2005 +@@ -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); -- cgit v1.2.3