~ubuntu-branches/ubuntu/jaunty/curl/jaunty-security

« back to all changes in this revision

Viewing changes to lib/easy.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-08-01 12:22:30 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070801122230-uaarmp6lo65py9t6
Tags: 7.16.4-1ubuntu1
* Merge with Debian.
  - Drop debian/patches/gnutls-verifications, applied upstream.
  - Remove all stuff which should be reverted according to 7.16.2-6ubuntu4.
  - Remaining change: drop stunnel build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: easy.c,v 1.101 2007-04-08 22:49:38 yangtse Exp $
 
21
 * $Id: easy.c,v 1.104 2007-06-27 20:15:48 jehousley Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
420
420
    timeout.tv_sec = 1;
421
421
    timeout.tv_usec = 0;
422
422
 
423
 
    /* get file descriptors from the transfers */
 
423
    /* Old deprecated style: get file descriptors from the transfers */
424
424
    curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
425
 
 
426
425
    rc = Curl_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
427
426
 
 
427
    /* The way is to extract the sockets and wait for them without using
 
428
       select. This whole alternative version should probably rather use the
 
429
       curl_multi_socket() approach. */
 
430
 
428
431
    if(rc == -1)
429
432
      /* select error */
430
433
      break;
511
514
                        void *multi)
512
515
{
513
516
  data->multi = multi;
 
517
  if (multi == NULL)
 
518
    /* the association is cleared, mark the easy handle as not used by an
 
519
       interface */
 
520
    data->state.used_interface = Curl_if_none;
514
521
}
515
522
 
516
523
void Curl_easy_initHandleData(struct SessionHandle *data)
636
643
 
637
644
  if(fail) {
638
645
    if(outcurl) {
639
 
      if((outcurl->state.connc->type == CONNCACHE_PRIVATE) &&
640
 
         outcurl->state.connc)
 
646
      if(outcurl->state.connc &&
 
647
         (outcurl->state.connc->type == CONNCACHE_PRIVATE))
641
648
        Curl_rm_connc(outcurl->state.connc);
642
649
      if(outcurl->state.headerbuff)
643
650
        free(outcurl->state.headerbuff);
724
731
 
725
732
  data->set.ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth
726
733
                                                      type */
 
734
  data->set.new_file_perms = 0644;    /* Default permissions */
 
735
  data->set.new_directory_perms = 0755; /* Default permissions */
727
736
}
728
737
 
729
738
#ifdef CURL_DOES_CONVERSIONS