debugging

This commit is contained in:
Dhanya Maliakal 2016-11-08 11:35:00 +01:00
parent 76435c5981
commit f7654f8c94

View File

@ -130,7 +130,7 @@ enum communicationProtocol{
serverAddress.sin_family = hostInfo->h_addrtype; serverAddress.sin_family = hostInfo->h_addrtype;
memcpy((char *) &serverAddress.sin_addr.s_addr, memcpy((char *) &serverAddress.sin_addr.s_addr,
hostInfo->h_addr_list[0], hostInfo->h_length); hostInfo->h_addr_list[0], hostInfo->h_length);
((char *) &serverAddress.sin_addr.s_addr)[hostInfo->h_length]='\0'; //a fix for valgrind //((char *) &serverAddress.sin_addr.s_addr)[hostInfo->h_length]='\0'; //a fix for valgrind
serverAddress.sin_port = htons(port_number); serverAddress.sin_port = htons(port_number);
socketDescriptor=0; //You can use send and recv, //would it work????? socketDescriptor=0; //You can use send and recv, //would it work?????
} }