Commit 83191dc1 authored by Franksen, Benjamin's avatar Franksen, Benjamin
Browse files

scan: re-enabled systec-ascii for Linux

parent 97f704f5
......@@ -61,7 +61,7 @@ mCANCore_SRCS_$(OS_CLASS) += ellsi.c
mCANCore_OBJS_$(OS_CLASS) += systec.o
endif
# this is currently broken:
#mCANCore_SRCS_Linux += socketcan.c
mCANCore_SRCS_Linux += socketcan.c
INC += scan.h
INC += socketcan.h
INC += systec-ascii.h
......
......@@ -346,8 +346,7 @@ int systecConfigPort(int can_port, const char *ip_addr, int ip_port) {
if (state) {
/* success, prepare addr with parameters ip_addr and ip_port */
state->addr.sin_family = AF_INET;
state->addr.sin_port = htons(ip_port);
if (inet_aton(ip_addr, &state->addr.sin_addr)) {
if (aToIPAddr(ip_addr, ip_port, &state->addr)<0) {
/* success, connect socket */
if (connect(sock, (struct sockaddr *)&state->addr, sizeof(struct sockaddr_in)) >= 0) {
/* success, allocate port_addr and methods */
......
......@@ -7,7 +7,6 @@
#include "epicsExport.h"
#include "iocsh.h"
#if 0
static const iocshArg socketcanConfigPortArg0 = { "port_num", iocshArgInt };
static const iocshArg socketcanConfigPortArg1 = { "ifname", iocshArgString };
static const iocshArg *const socketcanConfigPortArgs[] = {
......@@ -18,7 +17,6 @@ static void socketcanConfigPortCall(const iocshArgBuf *args)
{
socketcanConfigPort(args[0].ival, args[1].sval);
}
#endif
static const iocshArg systecConfigPortArg0 = { "can_port", iocshArgInt };
static const iocshArg systecConfigPortArg1 = { "ip_addr", iocshArgString };
......@@ -57,9 +55,7 @@ static void scanRegisterCommands(void)
static int firstTime = 1;
if (firstTime) {
firstTime = 0;
#if 0
iocshRegister(&socketcanConfigPortDef,socketcanConfigPortCall);
#endif
iocshRegister(&systecConfigPortDef,systecConfigPortCall);
iocshRegister(&ellsiConfigPortDef,ellsiConfigPortCall);
iocshRegister(&scanDumpPortsDef,scanDumpPortsCall);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment