1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixed some problems when compiling without ENABLE_SOCKET

This commit is contained in:
Steffen Vogel 2015-09-14 20:04:04 +02:00
parent 28a28b0b4e
commit a35906c437
5 changed files with 17 additions and 5 deletions

View file

@ -1,10 +1,15 @@
language: c
compiler: gcc
cache:
directories:
- thirdparty
install:
- make dependencies
script:
- make build
after_success:
- make test
deploy:
- make doc
- make deploy
- make deploy

View file

@ -31,7 +31,10 @@ libnl3: dirs
# Compile S2SS server
build:
make -C server CFLAGS=-I$(PREFIX)/usr/include/ LDFLAGS=-Wl,-L$(PREFIX)/usr/lib/
CFLAGS=-I$(PREFIX)/usr/include/ \
LDFLAGS=-Wl,-L$(PREFIX)/usr/lib/ \
NLDIR=$(PREFIX)/usr/include/libnl3/ \
make -C server
# Test S2SS server by running it for 3 secs
test:

View file

@ -31,6 +31,7 @@
#define MSG_TYPE_DATA 0 /**< Message contains float values */
#define MSG_TYPE_START 1 /**< Message marks the beginning of a new simulation case */
#define MSG_TYPE_STOP 2 /**< Message marks the end of a simulation case */
#define MSG_TYPE_EMPTY 3 /**< Message does not carry useful data */
#define MSG_ENDIAN_LITTLE 0 /**< Message values are in little endian format (float too!) */
#define MSG_ENDIAN_BIG 1 /**< Message values are in bit endian format */

View file

@ -12,14 +12,15 @@
#include "utils.h"
#include "list.h"
#include "if.h"
#include "tc.h"
#include "cfg.h"
#include "node.h"
#include "path.h"
#include "hooks.h"
#include "socket.h"
#include "file.h"
#ifdef ENABLE_SOCKET
#include "socket.h"
#endif
#ifdef ENABLE_GTFPGA
#include "gtfpga.h"
#endif

View file

@ -125,9 +125,11 @@ int node_stop(struct node *n)
void node_reverse(struct node *n)
{
switch (n->vt->type) {
#ifdef ENABLE_SOCKET
case BSD_SOCKET:
SWAP(n->socket->remote, n->socket->local);
break;
#endif
case LOG_FILE:
SWAP(n->file->path_in, n->file->path_out);
break;