sc = (TC_Connection *)tmalloc(sizeof(TC_Connection));
memset(sc, 0, sizeof(TC_Connection));
sc->serv_addr.sin_family = AF_INET;
- sc->serv_addr.sin_addr.s_addr = (name) ? inet_addr(name) : htonl(INADDR_ANY);
+ sc->serv_addr.sin_addr.s_addr = (name && *name != '*' ) ? inet_addr(name) : htonl(INADDR_ANY);
if ( sc->serv_addr.sin_addr.s_addr == INADDR_NONE ) {
struct hostent *host;
memset(&serv_addr, 0, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
- serv_addr.sin_addr.s_addr = inet_addr(host);
+ serv_addr.sin_addr.s_addr = (host && *host!='*') ? inet_addr(host) : htonl(INADDR_ANY);
if ( serv_addr.sin_addr.s_addr == INADDR_NONE ) {
struct hostent *ip_host;