/[resiprocate]/main/contrib/ares/ares_init.c
ViewVC logotype

Diff of /main/contrib/ares/ares_init.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3444 by derek, Wed Nov 10 20:34:40 2004 UTC revision 3705 by sgodin, Fri Dec 3 18:13:09 2004 UTC
# Line 373  Line 373 
373            num++;            num++;
374            pIPAddr = pIPAddr ->Next;            pIPAddr = pIPAddr ->Next;
375          }          }
376            if(num>0)
377            {
378          channel->servers = malloc( (num) * sizeof(struct server_state));          channel->servers = malloc( (num) * sizeof(struct server_state));
379                  if (!channel->servers)                  if (!channel->servers)
380                  {                  {
# Line 390  Line 392 
392            pIPAddr = pIPAddr ->Next;            pIPAddr = pIPAddr ->Next;
393          }          }
394          //printf("ARES: got all %d nameservers\n",num);          //printf("ARES: got all %d nameservers\n",num);
395            }
396            else
397            {
398                       /* If no specified servers, try a local named. */
399                       channel->servers = malloc(sizeof(struct server_state));
400                       if (!channel->servers)
401                  return ARES_ENOMEM;
402                       channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK);
403                       channel->nservers = 1;
404            }
405    
406          GlobalFree( FixedInfo );          GlobalFree( FixedInfo );
407              FreeLibrary(hLib);              FreeLibrary(hLib);
   
408            }            }
409  #else  #else
   
410                  /* If nobody specified servers, try a local named. */                  /* If nobody specified servers, try a local named. */
411                  channel->servers = malloc(sizeof(struct server_state));                  channel->servers = malloc(sizeof(struct server_state));
412                  if (!channel->servers)                  if (!channel->servers)

Legend:
Removed from v.3444  
changed lines
  Added in v.3705

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27