Home
last modified time | relevance | path

Searched refs:pxInfo (Results 1 – 2 of 2) sorted by relevance

/hal_espressif-3.4.0/components/freemodbus/tcp_master/port/
Dport_tcp_master.c227 static BOOL xMBTCPPortMasterCloseConnection(MbSlaveInfo_t* pxInfo) in xMBTCPPortMasterCloseConnection() argument
229 if (!pxInfo) { in xMBTCPPortMasterCloseConnection()
232 if (pxInfo->xSockId == -1) { in xMBTCPPortMasterCloseConnection()
233 ESP_LOGE(TAG, "Wrong socket info or disconnected socket: %d, skip.", pxInfo->xSockId); in xMBTCPPortMasterCloseConnection()
236 if (shutdown(pxInfo->xSockId, SHUT_RDWR) == -1) { in xMBTCPPortMasterCloseConnection()
237 ESP_LOGV(TAG, "Shutdown failed sock %d, errno=%d", pxInfo->xSockId, errno); in xMBTCPPortMasterCloseConnection()
239 close(pxInfo->xSockId); in xMBTCPPortMasterCloseConnection()
240 pxInfo->xSockId = -1; in xMBTCPPortMasterCloseConnection()
252 static int64_t xMBTCPPortMasterGetRespTimeLeft(MbSlaveInfo_t* pxInfo) in xMBTCPPortMasterGetRespTimeLeft() argument
254 if (!pxInfo) { in xMBTCPPortMasterGetRespTimeLeft()
[all …]
/hal_espressif-3.4.0/components/freemodbus/tcp_slave/port/
Dport_tcp_slave.c217 static BOOL xMBTCPPortCloseConnection(MbClientInfo_t* pxInfo) in xMBTCPPortCloseConnection() argument
219 MB_PORT_CHECK(pxInfo, FALSE, "Client info is NULL."); in xMBTCPPortCloseConnection()
221 if (pxInfo->xSockId == -1) { in xMBTCPPortCloseConnection()
222 ESP_LOGE(TAG, "Wrong socket info or disconnected socket: %d.", pxInfo->xSockId); in xMBTCPPortCloseConnection()
225 if (shutdown(pxInfo->xSockId, SHUT_RDWR) == -1) { in xMBTCPPortCloseConnection()
226 ESP_LOGE(TAG, "Socket (#%d), shutdown failed: errno %d", pxInfo->xSockId, errno); in xMBTCPPortCloseConnection()
228 close(pxInfo->xSockId); in xMBTCPPortCloseConnection()
229 pxInfo->xSockId = -1; in xMBTCPPortCloseConnection()