diff options
author | Dan Winship <danw@src.gnome.org> | 2008-02-28 17:08:58 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2008-02-28 17:08:58 +0000 |
commit | f0ac7d44c2f07eb97253e817ef3d09cb7028b0e3 (patch) | |
tree | 3a8374cf3ae8e2af3b836f6bc8902ade8ef2fce2 | |
parent | f4c8e3b25c0d0efbfc651a51627453d3285ba644 (diff) | |
download | libsoup-f0ac7d44c2f07eb97253e817ef3d09cb7028b0e3.tar.gz |
Re-revert the change from 2008-02-09; the problem with ssl-test.c was not
* 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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tests/ssl-test.c | 10 |
2 files changed, 12 insertions, 5 deletions
@@ -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), diff --git a/tests/ssl-test.c b/tests/ssl-test.c index 16dc5666..13eed661 100644 --- a/tests/ssl-test.c +++ b/tests/ssl-test.c @@ -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; |