My fork
Dependencies: WncControllerK64F
Fork of WNCInterface by
Diff: Socket/Socket.cpp
- Revision:
- 9:9f0578ff157a
- Parent:
- 7:fded23f50479
--- a/Socket/Socket.cpp Fri Oct 07 00:36:47 2016 +0000 +++ b/Socket/Socket.cpp Fri Oct 07 13:26:00 2016 +0000 @@ -63,8 +63,7 @@ int rslt; char address[5]; - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(fail); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), fail); // lets determine if they passed in an IP or a URL rslt = std::sscanf(url, "%3u.%3u.%3u.%3u", @@ -94,8 +93,7 @@ if( _sock_type<0 ) return 0; //nothing is connected currently - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(fail); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), fail); M_LOCK; int ret = !WNCInterface::_pwnc->closeSocket(0); M_ULOCK; @@ -106,8 +104,7 @@ blocking = blocking; timeout= timeout; - if( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ) - FATAL_WNC_ERROR(void); + CHK_WNCFE(( WNCInterface::_pwnc->getWncStatus() == FATAL_FLAG ), void); M_LOCK; WNCInterface::_pwnc->setReadRetryWait(0, 0); WNCInterface::_pwnc->setReadRetries(0, 0);