Changeset 94:5ab465115d30 in rrlib_util


Ignore:
Timestamp:
16.10.2013 20:12:08 (6 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Fix in sFileIOUtils::HostToIp functions: if host name cannot be resolved, program no longer terminates with a failed assertion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sFileIOUtils.cpp

    r93 r94  
    474474  RRLIB_LOG_PRINTF(DEBUG_VERBOSE_1, "sFileIOUtils::HostToIpViaHost() >>> got %d tokens:\n", tokens.size()); 
    475475  RRLIB_LOG_PRINT(DEBUG_VERBOSE_1, Join(tokens, "\n")); 
     476  if (tokens.size() != 4) 
     477  { 
     478    RRLIB_LOG_PRINT(WARNING, "Could not determine IP for host name ", name); 
     479    return address; 
     480  } 
    476481 
    477482  assert(tokens.size() == 4); 
Note: See TracChangeset for help on using the changeset viewer.