* hostent structure. It claims that h_addr_list is a pointer
* to character pointers, but it is really a pointer to a list
* of pointers to integers!!!
-*
+*
***************************************************************************
*/
#include "sisetup.h" // get necessary defs and other stuff
if( addr->sin_family == AF_INET6 ) {
addr6 = (struct sockaddr_in6 *) src; // really an ip6 struct
byte = (uint8_t *) &addr6->sin6_addr;
- snprintf( wbuf, sizeof( wbuf ), "[%u:%u:%u:%u:%u:%u]:%d",
+ snprintf( wbuf, sizeof( wbuf ), "[%u:%u:%u:%u:%u:%u]:%d",
*(byte+0), *(byte+1), *(byte+2),
*(byte+3), *(byte+4), *(byte+5) ,
(int) ntohs( addr6->sin6_port ) );
} else {
num = (char *) &addr->sin_addr.s_addr; // point at the long
- snprintf( wbuf, sizeof( wbuf ), "%u.%u.%u.%u;%d", *(num+0), *(num+1), *(num+2), *(num+3), (int) ntohs(addr->sin_port) );
+ snprintf( wbuf, sizeof( wbuf ), "%u.%u.%u.%u:%d", *(num+0), *(num+1), *(num+2), *(num+3), (int) ntohs(addr->sin_port) );
}
*dest = (void *) strdup( wbuf );