freebsd-ports/textproc/libtranslate/files/patch-src_translate-session.c
Mikhail Teterin ec966285b6 Unbreak, when libsoup is needed, by switching to libsoup24. Use 4
year-old patch for that purpose, that's available on MASTER_SITE.

While at it, apply some other patches sitting at the same location.
Some others were already present in our own files/ -- add the link
to the originals in those cases.

Turn on MAKE_JOBS_SAFE. Bump PORTREVISION.

The port needs a loving maintainer: services.xml file, for example,
is rather outdated: the self-testing included breaks for most online
translation services (for others the translation-results are slightly
different from those recorded at 2005).
2011-09-29 18:10:20 +00:00

42 lines
983 B
C

Copied from:
http://nongnu.askapache.com/libtranslate/libtranslate-0.99-condfix.diff
--- src/translate-session.c Mon Apr 11 22:44:53 2005
+++ 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);