Ignore:
Timestamp:
Oct 7, 2002, 12:25:56 PM (23 years ago)
Author:
sandervl
Message:

PF: GetAdaptersInfo bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/iphlpapi/iphlpapi.cpp

    r9290 r9328  
    1 /* $Id: iphlpapi.cpp,v 1.10 2002-09-24 11:47:14 sandervl Exp $ */
     1/* $Id: iphlpapi.cpp,v 1.11 2002-10-07 10:25:56 sandervl Exp $ */
    22/*
    33 *      IPHLPAPI library
     
    400400    DWORD dwRequired = i_sizeOfIP_ADAPTER_INFO(pip);
    401401   
    402     if (lSpaceLeft - dwRequired > 0)
     402    if (lSpaceLeft - dwRequired >= 0)
    403403    {
    404404      lSpaceLeft -= dwRequired;
    405405     
    406       // copy over the whole structure hierarchy
     406      // @PF revised - this thing works because we currently do not support
     407      // multi-ip, multi-gateway or multi-DHCP servers lists
     408      // TODO - add lists support
    407409      memcpy(pTarget, pip, sizeof( IP_ADAPTER_INFO ));
     410      // point to currentIPAddress
     411      ((PIP_ADAPTER_INFO)(pTarget))->CurrentIpAddress = &((PIP_ADAPTER_INFO)(pTarget))->IpAddressList;
    408412      pTarget += sizeof( IP_ADAPTER_INFO );
    409413       
    410       // point to currentIPAddress
    411       ((PIP_ADAPTER_INFO)(pTarget))->CurrentIpAddress = &((PIP_ADAPTER_INFO)(pTarget))->IpAddressList;
    412       //@@PF Need to fix lots of stuff here
    413414//      i_copyIP_ADDRESS_STRING(&pTarget, &pip->IpAddressList);
    414415//      i_copyIP_ADDRESS_STRING(&pTarget, &pip->GatewayList);
Note: See TracChangeset for help on using the changeset viewer.