cmUdpPort.c:Fixed bug in cmUdpAddrToString().

This commit is contained in:
kpl 2013-04-27 11:17:46 -07:00
parent 8f9689faa8
commit f4caf7f522

View File

@ -553,7 +553,7 @@ const cmChar_t* cmUdpAddrToString( cmUdpH_t h, const struct sockaddr_in* addr )
_cmUdpClear_errno(); _cmUdpClear_errno();
if( inet_ntop(AF_INET, addr, p->ntopBuf, INET_ADDRSTRLEN) == NULL) if( inet_ntop(AF_INET, &(addr->sin_addr), p->ntopBuf, INET_ADDRSTRLEN) == NULL)
{ {
cmErrSysMsg(&p->err,kNtoPFailUdpRC,errno, "Network address to string conversion failed." ); cmErrSysMsg(&p->err,kNtoPFailUdpRC,errno, "Network address to string conversion failed." );
return NULL; return NULL;