Changeset 241 in flair-src


Ignore:
Timestamp:
May 15, 2018, 5:50:30 PM (4 years ago)
Author:
Bayard Gildas
Message:

bug fix

Location:
trunk/lib/FlairCore/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/TcpSocket.cpp

    r238 r241  
    136136  sockaddr_in serv_addr;
    137137  serv_addr.sin_family = AF_INET;
    138   serv_addr.sin_port = htons(short(distantPort));
    139   if (inet_pton(AF_INET, distantAddress.c_str(), &serv_addr.sin_addr) <= 0) {
    140     printf("incorrect network address.");
     138  serv_addr.sin_port = htons(short(_distantPort));
     139  if (inet_pton(AF_INET, _distantAddress.c_str(), &serv_addr.sin_addr) <= 0) {
     140    Warn("incorrect network address.\n");
    141141    close(socket);
    142142    socket=0;
     
    144144  }
    145145  memset(&(serv_addr.sin_zero), '\0', 8);
     146  distantPort=_distantPort;
     147  distantAddress=_distantAddress;
    146148
    147149  // go non blocking
  • trunk/lib/FlairCore/src/UdtSocket.cpp

    r15 r241  
    9595  serv_addr.sin_port = htons(short(port));
    9696  if (inet_pton(AF_INET, distantAddress.c_str(), &serv_addr.sin_addr) <= 0) {
    97     printf("incorrect network address.");
     97    Warn("incorrect network address.\n");
    9898    success = false;
    9999  }
Note: See TracChangeset for help on using the changeset viewer.