cwDnsSd.cpp/cwMdns.cpp : Remove use of socket handle in calls to socket::initAddr().

This commit is contained in:
kpl 2020-03-16 22:55:39 -04:00
parent 38cf5a0714
commit 85993019b4
2 changed files with 3 additions and 4 deletions

View File

@ -218,11 +218,10 @@ namespace cw
{ {
rc_t rc = kOkRC; rc_t rc = kOkRC;
char* formatStr = nullptr; char* formatStr = nullptr;
socket::handle_t sockH = srv::socketHandle( p->tcpH );
struct sockaddr_in hostAddr; struct sockaddr_in hostAddr;
// get the 32bit host address // 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; return rc;
// Get the service 'TXT' fields in the format expected by dns_sd // Get the service 'TXT' fields in the format expected by dns_sd

View File

@ -1126,7 +1126,7 @@ bool tcpReceiveCallback( void* arg )
struct sockaddr_in addr; 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."); error(&p->mdns,"Get inet address failed.");
goto errLabel; goto errLabel;
@ -1166,7 +1166,7 @@ bool tcpReceiveCallback( void* arg )
struct sockaddr_in addr; 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."); error(&p->mdns,"Get inet address failed.");
goto errLabel; goto errLabel;