Mercurial > gftp.yaz
comparison lib/sslcommon.c @ 210:82ebd1b05345
2003-7-6 Brian Masney <masneyb@gftp.org>
* lib/pty.c lib/gftp.h - added gftp_exec_with_new_pty() and
gftp_exec_without_new_pty()
* lib/sshv2.c - use the 2 new functions above
* lib/pty.c lib/gftp.h - split open_ptys() to _gftp_ptym_open()
and _gftp_ptys_open()
* lib/sslcommon.c - don't do thread setup if we are compiling against
glib 1.2. I do not want to link against the pthread library because
that would make the text port dependant on pthreads being installed on
the box
author | masneyb |
---|---|
date | Sun, 06 Jul 2003 13:52:43 +0000 |
parents | 75eebb3b0592 |
children | 3d6e024dbf31 |
comparison
equal
deleted
inserted
replaced
209:d79e2782eb1b | 210:82ebd1b05345 |
---|---|
204 _gftp_ssl_id_function (void) | 204 _gftp_ssl_id_function (void) |
205 { | 205 { |
206 #if GLIB_MAJOR_VERSION > 1 | 206 #if GLIB_MAJOR_VERSION > 1 |
207 return ((unsigned long) g_thread_self ()); | 207 return ((unsigned long) g_thread_self ()); |
208 #else | 208 #else |
209 /* FIXME _ call pthread version */ | 209 /* FIXME _ call pthread version. Once this is done, the #ifdef below can be |
210 removed */ | |
210 return (0); | 211 return (0); |
211 #endif | 212 #endif |
212 } | 213 } |
213 | 214 |
214 | 215 |
245 | 246 |
246 static void | 247 static void |
247 _gftp_ssl_thread_setup (void) | 248 _gftp_ssl_thread_setup (void) |
248 { | 249 { |
249 int i; | 250 int i; |
251 | |
252 #ifdef G_MAJOR_VERSION == 1 | |
253 /* Thread setup isn't supported in glib 1.2 yet */ | |
254 return; | |
255 #endif | |
250 | 256 |
251 gftp_ssl_mutexes = g_malloc (CRYPTO_num_locks( ) * sizeof (*gftp_ssl_mutexes)); | 257 gftp_ssl_mutexes = g_malloc (CRYPTO_num_locks( ) * sizeof (*gftp_ssl_mutexes)); |
252 | 258 |
253 for (i = 0; i < CRYPTO_num_locks ( ); i++) | 259 for (i = 0; i < CRYPTO_num_locks ( ); i++) |
254 gftp_ssl_mutexes[i] = g_mutex_new (); | 260 gftp_ssl_mutexes[i] = g_mutex_new (); |