Re-revert the change from 2008-02-09; the problem with ssl-test.c was not
authorDan Winship <danw@src.gnome.org>
Thu, 28 Feb 2008 17:08:58 +0000 (17:08 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 28 Feb 2008 17:08:58 +0000 (17:08 +0000)
* tests/ssl-test.c: Re-revert the change from 2008-02-09; the
problem with ssl-test.c was not that soup_gnutls_init() wasn't
thread-safe, it's that the server thread doesn't do anything that
would ever cause soup_gnutls_init() to be called, and so if the
client thread doesn't start first, the server thread will run
without initializing GNUTLS.

svn path=/trunk/; revision=1100

ChangeLog
tests/ssl-test.c

index 4eafa86..df55d82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,13 @@
        * libsoup/soup-session.c (finalize): free priv->user_agent.
        #518798, Wouter Cloetens.
 
+       * tests/ssl-test.c: Re-revert the change from 2008-02-09; the
+       problem with ssl-test.c was not that soup_gnutls_init() wasn't
+       thread-safe, it's that the server thread doesn't do anything that
+       would ever cause soup_gnutls_init() to be called, and so if the
+       client thread doesn't start first, the server thread will run
+       without initializing GNUTLS.
+
 2008-02-27  Benjamin Otte  <otte@gnome.org>
 
        * libsoup/soup-socket.c: (read_from_network), (soup_socket_read),
index 16dc566..13eed66 100644 (file)
@@ -277,11 +277,7 @@ main (int argc, char **argv)
        getsockname (listener, (struct sockaddr *)&sin, (void *)&sin_len);
        port = ntohs (sin.sin_port);
 
-       /* Now spawn server thread */
-       server = g_thread_create (server_thread, GINT_TO_POINTER (listener),
-                                 TRUE, NULL);
-
-       /* And create the client */
+       /* Create the client */
        addr = soup_address_new ("127.0.0.1", port);
        creds = soup_ssl_get_client_credentials (NULL);
        sock = soup_socket_new (SOUP_SOCKET_REMOTE_ADDRESS, addr,
@@ -297,6 +293,10 @@ main (int argc, char **argv)
 
        soup_socket_start_ssl (sock, NULL);
 
+       /* Now spawn server thread */
+       server = g_thread_create (server_thread, GINT_TO_POINTER (listener),
+                                 TRUE, NULL);
+
        /* Synchronous client test */
        for (i = 0; i < BUFSIZE; i++)
                writebuf[i] = i & 0xFF;