Skip to content

Commit

Permalink
Exit on select() error
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Aug 19, 2019
1 parent 50071ad commit 85c4925
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/simwin/xcp_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
#define XCP_STATION_ID "description_of_test_ecu"

#define XCP_BUILD_TYPE XCP_DEBUG_BUILD
#define XCP_BUILD_TYPE XCP_RELEASE_BUILD

#define XCP_ENABLE_EXTERN_C_GUARDS XCP_OFF

Expand Down Expand Up @@ -68,7 +68,7 @@
** DAQ Settings.
*/
#define XCP_DAQ_CONFIG_TYPE XCP_DAQ_CONFIG_TYPE_NONE
#define XCP_DAQ_DTO_BUFFER_SIZE (40)
#define XCP_DAQ_DTO_BUFFER_SIZE (40)
#define XCP_DAQ_ENABLE_PREDEFINED_LISTS XCP_ON
#define XCP_DAQ_TIMESTAMP_UNIT (XCP_DAQ_TIMESTAMP_UNIT_1US)
#define XCP_DAQ_TIMESTAMP_SIZE (XCP_DAQ_TIMESTAMP_SIZE_4)
Expand Down
2 changes: 2 additions & 0 deletions inc/xcp_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ extern "C"
#endif /* XCP_EXTERN_C_GUARDS */


#include "xcp_config.h"

#if defined(_WIN32) && (XCP_BUILD_TYPE == XCP_DEBUG_BUILD)
#include <stdio.h>
#endif /* defined(_WIN32) */
Expand Down
1 change: 1 addition & 0 deletions src/tl/eth/wineth.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ int16_t XcpTl_FrameAvailable(uint32_t sec, uint32_t usec)
res = select(0, &fds, 0, 0, &timeout);
if (res == SOCKET_ERROR) {
Win_ErrorMsg("XcpTl_FrameAvailable:select()", WSAGetLastError());
exit(2);
}
return res;
} else {
Expand Down

0 comments on commit 85c4925

Please sign in to comment.