Skip to content

Commit

Permalink
More graceful shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Aug 26, 2019
1 parent 824e327 commit 9162378
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion inc/xcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@ void Xcp_MainFunction(void);
** Global Helper Functions.
*/
void Xcp_DispatchCommand(Xcp_PDUType const * const pdu);


void Xcp_Disconnect(void);
Xcp_ConnectionStateType Xcp_GetConnectionState(void);
void Xcp_SetSendCallout(Xcp_SendCalloutType callout);
Xcp_MtaType Xcp_GetNonPagedAddress(void const * const ptr);
Expand Down
2 changes: 1 addition & 1 deletion src/tl/eth/wineth.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ void XcpTl_RxHandler(void)
if (recv_len == 0) {
DBG_PRINT1("Client closed connection\n");
closesocket(XcpTl_Connection.connectedSocket);
XcpTl_Connection.connected = XCP_FALSE;
Xcp_Disconnect();
return;
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/xcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ static bool Xcp_SlaveBlockTransferIsActive(void);
static void Xcp_SlaveBlockTransferSetActive(bool onOff);
#endif /* XCP_ENABLE_SLAVE_BLOCKMODE */

static void Xcp_Disconnect(void);
static void Xcp_SendResult(Xcp_ReturnType result);

static void Xcp_CommandNotImplemented_Res(Xcp_PDUType const * const pdu);
Expand Down Expand Up @@ -655,7 +654,7 @@ static void Xcp_DefaultResourceProtection(void)
}


static void Xcp_Disconnect(void)
void Xcp_Disconnect(void)
{
XcpTl_ReleaseConnection();
Xcp_DefaultResourceProtection();
Expand Down

0 comments on commit 9162378

Please sign in to comment.