diff --git a/cwDnsSd.cpp b/cwDnsSd.cpp index 57da197..0e89c11 100644 --- a/cwDnsSd.cpp +++ b/cwDnsSd.cpp @@ -218,11 +218,10 @@ namespace cw { rc_t rc = kOkRC; char* formatStr = nullptr; - socket::handle_t sockH = srv::socketHandle( p->tcpH ); struct sockaddr_in hostAddr; // get the 32bit host address - if((rc = initAddr( sockH, p->hostIpAddr, p->hostPort, &hostAddr )) != kOkRC ) + if((rc = socket::initAddr( p->hostIpAddr, p->hostPort, &hostAddr )) != kOkRC ) return rc; // Get the service 'TXT' fields in the format expected by dns_sd diff --git a/cwMdns.cpp b/cwMdns.cpp index 90d1d69..c2b9b56 100644 --- a/cwMdns.cpp +++ b/cwMdns.cpp @@ -1126,7 +1126,7 @@ bool tcpReceiveCallback( void* arg ) struct sockaddr_in addr; - if((rc = socket::initAddr( sockH, "192.168.0.68", 4325, &addr )) != kOkRC ) + if((rc = socket::initAddr( "192.168.0.68", 4325, &addr )) != kOkRC ) { error(&p->mdns,"Get inet address failed."); goto errLabel; @@ -1166,7 +1166,7 @@ bool tcpReceiveCallback( void* arg ) struct sockaddr_in addr; - if((rc = socket::initAddr( sockH, "192.168.0.68", 4325, &addr )) != kOkRC ) + if((rc = socket::initAddr( "192.168.0.68", 4325, &addr )) != kOkRC ) { error(&p->mdns,"Get inet address failed."); goto errLabel;