diff --git a/server/include/node.h b/server/include/node.h index 3fb94a8da..a2e5dbf5e 100644 --- a/server/include/node.h +++ b/server/include/node.h @@ -53,10 +53,10 @@ extern struct list node_types; * @todo Add comments */ struct node_type { - /** The unique name of this node. This must be the first member! */ + /** The unique name of this node. This must be allways the first member! */ char *name; - /** Node type: layer, protocol, listen/connect */ + /** Node type */ enum { BSD_SOCKET, /**< BSD Socket API */ LOG_FILE, /**< File IO */ @@ -65,7 +65,7 @@ struct node_type { NGSI /**< NGSI 9/10 HTTP RESTful API (FIRWARE ContextBroker) */ } type; - /** Parse node connection details for SOCKET type + /** Parse node connection details.‚ * * @param cfg A libconfig object pointing to the node. * @param n A pointer to the node structure which should be parsed. @@ -81,7 +81,7 @@ struct node_type { */ char * (*print)(struct node *n); - /** Create new socket and connect(), bind(), accept(). + /** Opens the connection to this node. * * @param n A pointer to the node. * @retval 0 Success. Everything went well. @@ -89,7 +89,7 @@ struct node_type { */ int (*open) (struct node *n); - /** Close the socket. + /** Close the connection to this node. * * @param n A pointer to the node. * @retval 0 Success. Everything went well. @@ -97,12 +97,13 @@ struct node_type { */ int (*close)(struct node *n); - /** Receive multiple messages from single datagram / packet. + /** Receive multiple messages at once. * * Messages are received with a single recvmsg() syscall by * using gathering techniques (struct iovec). * The messages will be stored in a circular buffer / array @p m. * Indexes used to address @p m will wrap around after len messages. + * Some node types might only support to receive one message at a time. * * @param n A pointer to the node where the messages should be sent to. * @param pool A pointer to an array of messages which should be sent. diff --git a/server/include/path.h b/server/include/path.h index bf9e918d2..519832040 100644 --- a/server/include/path.h +++ b/server/include/path.h @@ -132,7 +132,6 @@ int path_reset(struct path *p); */ void path_print_stats(struct path *p); - /** Fills the provided buffer with a string representation of the path. * * Format: source => [ dest1 dest2 dest3 ] diff --git a/server/src/gtfpga.c b/server/src/gtfpga.c index e6b9b4ac8..c763dd68d 100644 --- a/server/src/gtfpga.c +++ b/server/src/gtfpga.c @@ -218,14 +218,9 @@ int gtfpga_open(struct node *n) if (ret) serror("Failed to start timer"); } - else - /** @todo implement UIO interrupts */ + else /** @todo implement UIO interrupts */ error("UIO irq not implemented yet. Use 'rate' setting"); - char buf[1024]; - gtfpga_print(n, buf, sizeof(buf)); - debug(5, "Found GTFPGA card: %s", buf); - return 0; } diff --git a/server/src/log.c b/server/src/log.c index 015a9388d..006669a25 100644 --- a/server/src/log.c +++ b/server/src/log.c @@ -63,6 +63,7 @@ void log_reset() void log_print(const char *lvl, const char *fmt, ...) { va_list ap; + va_start(ap, fmt); log_vprint(lvl, fmt, ap); va_end(ap); diff --git a/server/src/opal.c b/server/src/opal.c index 5304a2b79..e0b805ce0 100644 --- a/server/src/opal.c +++ b/server/src/opal.c @@ -69,6 +69,7 @@ int opal_init(int argc, char *argv[], struct settings *set) info("Started as OPAL Asynchronous process"); info("This is Simulator2Simulator Server (S2SS) %s (built on %s, %s)", VERSION, __DATE__, __TIME__); + opal_print_global(og); return 0;