Browse Source

cmUdpPort.c:Fixed bug in cmUdpAddrToString().

master
kpl 11 years ago
parent
commit
f4caf7f522
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cmUdpPort.c

+ 1
- 1
cmUdpPort.c View File

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

Loading…
Cancel
Save