From 85993019b40b5182a8e0744e075c469b5aac0f39 Mon Sep 17 00:00:00 2001 From: kpl Date: Mon, 16 Mar 2020 22:55:39 -0400 Subject: [PATCH] cwDnsSd.cpp/cwMdns.cpp : Remove use of socket handle in calls to socket::initAddr(). --- cwDnsSd.cpp | 3 +-- cwMdns.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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;