~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to keyserver/curl-shim.c

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-08 22:46:47 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308224647-gq17gatcl71lrc2k
Tags: 2.0.11-1
* New upstream release. (Closes: #496663)
* debian/control: Make the description a little more distinctive than
  gnupg v1's. Thanks Jari Aalto. (Closes: #496323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* curl-shim.c - Implement a small subset of the curl API in terms of
2
2
 * the iobuf HTTP API
3
3
 *
4
 
 * Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
4
 * Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5
5
 *
6
6
 * This file is part of GnuPG.
7
7
 *
78
78
CURLcode
79
79
curl_global_init(long flags)
80
80
{
 
81
  (void)flags;
81
82
  return CURLE_OK;
82
83
}
83
84
 
89
90
{
90
91
  CURL *handle;
91
92
 
 
93
#ifdef HAVE_W32_SYSTEM
 
94
  w32_init_sockets ();
 
95
#endif
 
96
 
92
97
  handle=calloc(1,sizeof(CURL));
93
98
  if(handle)
94
99
    handle->errors=stderr;
134
139
      curl->proxy=va_arg(ap,char *);
135
140
      break;
136
141
    case CURLOPT_POST:
137
 
      curl->flags.post=va_arg(ap,unsigned int);
 
142
      curl->flags.post=va_arg(ap,long)?1:0;
138
143
      break;
139
144
    case CURLOPT_POSTFIELDS:
140
145
      curl->postfields=va_arg(ap,char *);
141
146
      break;
142
147
    case CURLOPT_FAILONERROR:
143
 
      curl->flags.failonerror=va_arg(ap,unsigned int);
 
148
      curl->flags.failonerror=va_arg(ap,long)?1:0;
144
149
      break;
145
150
    case CURLOPT_VERBOSE:
146
 
      curl->flags.verbose=va_arg(ap,unsigned int);
 
151
      curl->flags.verbose=va_arg(ap,long)?1:0;
147
152
      break;
148
153
    case CURLOPT_STDERR:
149
154
      curl->errors=va_arg(ap,FILE *);
336
341
  static curl_version_info_data data;
337
342
  static const char *protocols[]={"http",NULL};
338
343
 
 
344
  (void)type;
 
345
 
339
346
  data.protocols=protocols;
340
347
 
341
348
  return &data;