~ubuntu-branches/ubuntu/lucid/curl/lucid-201101212007

« back to all changes in this revision

Viewing changes to lib/hostares.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-02-08 11:20:41 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080208112041-hed7sb5r6ghmjf8v
Tags: upstream-7.18.0
ImportĀ upstreamĀ versionĀ 7.18.0

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: hostares.c,v 1.35 2007-10-20 15:11:51 yangtse Exp $
 
21
 * $Id: hostares.c,v 1.36 2007-11-07 09:21:35 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
244
244
    timeout = CURL_TIMEOUT_RESOLVE * 1000; /* default name resolve timeout */
245
245
 
246
246
  /* Wait for the name resolve query to complete. */
247
 
  while (1) {
 
247
  while(1) {
248
248
    struct timeval *tvp, tv, store;
249
249
    struct timeval now = Curl_tvnow();
250
250
    long timediff;
262
262
 
263
263
    timediff = Curl_tvdiff(Curl_tvnow(), now); /* spent time */
264
264
    timeout -= timediff?timediff:1; /* always deduct at least 1 */
265
 
    if (timeout < 0) {
 
265
    if(timeout < 0) {
266
266
      /* our timeout, so we cancel the ares operation */
267
267
      ares_cancel(data->state.areschannel);
268
268
      break;
316
316
 
317
317
  *waitp = FALSE;
318
318
 
319
 
  if (in != CURL_INADDR_NONE) {
 
319
  if(in != CURL_INADDR_NONE) {
320
320
    /* This is a dotted IP address 123.123.123.123-style */
321
321
    return Curl_ip2addr(in, hostname, port);
322
322
  }