From: Bertrand <bco...@us...> - 2017-03-11 12:12:15
|
Update of /cvsroot/jsbsim/JSBSim/src/input_output In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30309/src/input_output Modified Files: FGfdmSocket.cpp Log Message: Fixed a bug reported by Ron H. and Rebecca N. Palmer on the FG mailing list: the 'length' parameter passed to gethostbyaddr was erroneous. Index: FGfdmSocket.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/input_output/FGfdmSocket.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** FGfdmSocket.cpp 22 Mar 2015 12:19:31 -0000 1.31 --- FGfdmSocket.cpp 11 Mar 2017 12:12:12 -0000 1.32 *************** *** 94,100 **** } } else { ! unsigned int ip; ip = inet_addr(address.c_str()); ! if ((host = gethostbyaddr((char*)&ip, address.size(), PF_INET)) == NULL) { cout << "Could not get host net address by number..." << endl; } --- 94,100 ---- } } else { ! unsigned long ip; ip = inet_addr(address.c_str()); ! if ((host = gethostbyaddr((char*)&ip, sizeof(ip), PF_INET)) == NULL) { cout << "Could not get host net address by number..." << endl; } |