libsoup r1100 - in trunk: . tests



Author: danw
Date: Thu Feb 28 17:08:58 2008
New Revision: 1100
URL: http://svn.gnome.org/viewvc/libsoup?rev=1100&view=rev

Log:
	* 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.


Modified:
   trunk/ChangeLog
   trunk/tests/ssl-test.c

Modified: trunk/tests/ssl-test.c
==============================================================================
--- trunk/tests/ssl-test.c	(original)
+++ trunk/tests/ssl-test.c	Thu Feb 28 17:08:58 2008
@@ -277,11 +277,7 @@
 	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 @@
 
 	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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]