Skip to content

Commit

Permalink
Fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Feb 23, 2020
1 parent b20caf9 commit 5427442
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/tl/eth/linuxeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static bool Xcp_DisableSocketOption(int sock, int option)
return true;
}

static int Xcp_Set_Nonblocking(int fd)
static int Xcp_SetNonblocking(int fd)
{
int old_option = fcntl(fd, F_GETFL);
int new_option = old_option | O_NONBLOCK;
Expand Down Expand Up @@ -357,7 +357,7 @@ void lt_process(struct epoll_event* events, int number, int epoll_fd, int listen
socklen_t client_addrlength = sizeof(client_address);
int connfd = accept(listen_fd, (struct sockaddr*)&client_address, &client_addrlength);
printf("accepted()\n");
Xcp_AddFd(epoll_fd, connfd, false); //Register new customer connection fd to epoll event table, using lt mode
Xcp_AddFd(epoll_fd, connfd); //Register new customer connection fd to epoll event table, using lt mode
} else if(events[i].events & EPOLLIN) { //Readable with client data
// This code is triggered as long as the data in the buffer has not been read.This is what LT mode is all about: repeating notifications until processing is complete
printf("lt mode: event trigger once!\n");
Expand Down Expand Up @@ -435,6 +435,9 @@ int16_t XcpTl_FrameAvailable(uint32_t sec, uint32_t usec)

void XcpTl_Send(uint8_t const * buf, uint16_t len)
{

XcpUtl_Hexdump(buf, len);

if (XcpTl_Connection.socketType == SOCK_DGRAM) {
if (sendto(XcpTl_Connection.boundSocket, (char const *)buf, len, 0,
(struct sockaddr const *)&XcpTl_Connection.connectionAddress, addrSize) == -1) {
Expand Down

0 comments on commit 5427442

Please sign in to comment.