~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to docs/examples/opensslthreadlock.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * $Id: opensslthreadlock.c,v 1.2 2007-07-12 21:11:10 danf Exp $
 
8
 * $Id: opensslthreadlock.c,v 1.3 2008-09-06 05:29:05 yangtse Exp $
9
9
 *
10
10
 * Example source code to show one way to set the necessary OpenSSL locking
11
11
 * callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
56
56
{
57
57
  int i;
58
58
 
59
 
  mutex_buf = (MUTEX_TYPE *)malloc(CRYPTO_num_locks(  ) * sizeof(MUTEX_TYPE));
 
59
  mutex_buf = malloc(CRYPTO_num_locks(  ) * sizeof(MUTEX_TYPE));
60
60
  if (!mutex_buf)
61
61
    return 0;
62
62
  for (i = 0;  i < CRYPTO_num_locks(  );  i++)