~ubuntu-branches/ubuntu/raring/curl/raring-updates

« back to all changes in this revision

Viewing changes to tests/libtest/lib560.c

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2011-11-13 21:07:32 UTC
  • mto: (3.6.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: package-import@ubuntu.com-20111113210732-bk5n25x2tu7aplur
Tags: upstream-7.22.0
ImportĀ upstreamĀ versionĀ 7.22.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "test.h"
23
23
 
24
24
#include "warnless.h"
 
25
#include "memdebug.h"
25
26
 
26
27
/*
27
28
 * Simply download a HTTPS file!
37
38
{
38
39
  CURL *http_handle;
39
40
  CURLM *multi_handle = NULL;
40
 
  CURLMcode code;
41
41
  int res;
42
42
 
43
43
  int still_running; /* keep number of running handles */
63
63
  curl_multi_add_handle(multi_handle, http_handle);
64
64
 
65
65
  /* we start some action by calling perform right away */
66
 
  do {
67
 
    code = curl_multi_perform(multi_handle, &still_running);
68
 
  } while(code == CURLM_CALL_MULTI_PERFORM);
 
66
  (void) curl_multi_perform(multi_handle, &still_running);
69
67
 
70
68
  while(still_running) {
71
69
    struct timeval timeout;
100
98
    case 0:
101
99
    default:
102
100
      /* timeout or readable/writable sockets */
103
 
      do {
104
 
        code = curl_multi_perform(multi_handle, &still_running);
105
 
      } while(code == CURLM_CALL_MULTI_PERFORM);
 
101
      (void) curl_multi_perform(multi_handle, &still_running);
106
102
      break;
107
103
    }
108
104
  }