Frank Dietrich
Federico Heinz
Marius Glauser
+ Christian Cornelssen
+2008-01-21 [colin] 3.2.0cvs57
+
+ * AUTHORS
+ * src/matcher.c
+ * src/mimeview.c
+ * src/common/ssl.c
+ * src/gtk/authors.h
+ Fix bug 1478, 'Wrong pthread_create calls all
+ over the place'. Patch by Christian Cornelssen
+
2008-01-20 [colin] 3.2.0cvs56
* src/imap.c
( cvs diff -u -r 1.274.2.229 -r 1.274.2.230 src/mainwindow.c; ) > 3.2.0cvs54.patchset
( cvs diff -u -r 1.3.2.16 -r 1.3.2.17 src/folderutils.c; ) > 3.2.0cvs55.patchset
( cvs diff -u -r 1.179.2.208 -r 1.179.2.209 src/imap.c; cvs diff -u -r 1.1.4.94 -r 1.1.4.95 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.22 -r 1.1.4.23 src/etpan/imap-thread.h; ) > 3.2.0cvs56.patchset
+( cvs diff -u -r 1.100.2.58 -r 1.100.2.59 AUTHORS; cvs diff -u -r 1.75.2.53 -r 1.75.2.54 src/matcher.c; cvs diff -u -r 1.83.2.124 -r 1.83.2.125 src/mimeview.c; cvs diff -u -r 1.9.2.25 -r 1.9.2.26 src/common/ssl.c; cvs diff -u -r 1.1.2.44 -r 1.1.2.45 src/gtk/authors.h; ) > 3.2.0cvs57.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=56
+EXTRA_VERSION=57
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
static gint SSL_connect_nb(gnutls_session ssl)
#endif
{
-#if (defined USE_PTHREAD && ((defined __GLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))) || !defined __GLIBC__))
+#ifdef USE_PTHREAD
thread_data *td = g_new0(thread_data, 1);
pthread_t pt;
+ pthread_attr_t pta;
void *res = NULL;
#ifdef USE_GNUTLS
int result;
/* try to create a thread to initialize the SSL connection,
* fallback to blocking method in case of problem
*/
- if (pthread_create(&pt, PTHREAD_CREATE_JOINABLE,
- SSL_connect_thread, td) != 0) {
+ if (pthread_attr_init(&pta) != 0 ||
+ pthread_attr_setdetachstate(&pta, PTHREAD_CREATE_JOINABLE) != 0 ||
+ pthread_create(&pt, &pta, SSL_connect_thread, td) != 0) {
#ifdef USE_OPENSSL
return SSL_connect(ssl);
#else
do {
result = gnutls_handshake(td->ssl);
} while (result == GNUTLS_E_AGAIN || result == GNUTLS_E_INTERRUPTED);
+ return result;
#endif
}
debug_print("waiting for SSL_connect thread...\n");
"Tsu-Fan Cheng",
"Manrat Chobchuen",
"Rich Coe",
+"Christian Cornelssen",
"George Danchev",
"Matthieu Dazy",
"Pierric Descamps",
gint retval;
#ifdef USE_PTHREAD
pthread_t pt;
+ pthread_attr_t pta;
thread_data *td = g_new0(thread_data, 1);
void *res = NULL;
time_t start_time = time(NULL);
if (cmd == NULL)
return FALSE;
-#if (defined USE_PTHREAD && ((defined __GLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))) || !defined __GLIBC__))
+#ifdef USE_PTHREAD
/* debug output */
if (debug_filtering_session
&& prefs_common.filtering_debug_level >= FILTERING_DEBUG_LEVEL_HIGH) {
td->cmd = cmd;
td->done = FALSE;
- if (pthread_create(&pt, PTHREAD_CREATE_JOINABLE,
- matcher_test_thread, td) != 0)
+ if (pthread_attr_init(&pta) != 0 ||
+ pthread_attr_setdetachstate(&pta, PTHREAD_CREATE_JOINABLE) != 0 ||
+ pthread_create(&pt, &pta, matcher_test_thread, td) != 0)
retval = system(cmd);
else {
debug_print("waiting for test thread\n");
mimeview->check_data->siginfo = mimeview->siginfo;
debug_print("creating thread\n");
- pthread_attr_init(&detach);
- pthread_attr_setdetachstate(&detach, TRUE);
-
- pthread_attr_init(&detach2);
- pthread_attr_setdetachstate(&detach2, TRUE);
-
- /* create the checker thread */
- if (pthread_create(&th, &detach,
+ /* init thread attributes and create the checker thread */
+ if (pthread_attr_init(&detach) != 0 ||
+ pthread_attr_setdetachstate(&detach, PTHREAD_CREATE_DETACHED) != 0 ||
+ pthread_attr_init(&detach2) != 0 ||
+ pthread_attr_setdetachstate(&detach2, PTHREAD_CREATE_DETACHED) != 0 ||
+ pthread_create(&th, &detach,
mimeview_check_sig_worker_thread,
mimeview) != 0) {
/* arh. We'll do it synchronously. */
#endif
noticeview_set_text(mimeview->siginfoview, _("Checking signature..."));
GTK_EVENTS_FLUSH();
-#if (defined USE_PTHREAD && ((defined __GLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))) || !defined __GLIBC__))
+#ifdef USE_PTHREAD
/* let's do it non-blocking */
mimeview_check_sig_in_thread(mimeview);
if (!mimeview->check_data) /* let's check syncronously */