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

small cleanups

This commit is contained in:
Steffen Vogel 2015-03-18 16:16:44 +01:00
parent 39e6a92b61
commit a9e1137a62
2 changed files with 5 additions and 5 deletions

View file

@ -58,8 +58,10 @@ struct node_vtable const * node_lookup_vtable(const char *str)
int node_start(struct node *n)
{
if (!n->refcnt)
if (!n->refcnt) {
warn("Node '%s' is unused. Skipping...", n->name);
return -1;
}
char str[256];
node_print(n, str, sizeof(str));

View file

@ -46,9 +46,7 @@ int socket_open(struct node *n)
struct sockaddr_in *sin = (struct sockaddr_in *) &s->local;
struct sockaddr_ll *sll = (struct sockaddr_ll *) &s->local;
int ret;
s->sd = s->sd2 = -1;
/* Create socket */
switch (node_type(n)) {
case TCPD:
@ -166,7 +164,7 @@ int socket_write(struct node *n, struct msg *m)
ret = send(s->sd, m, MSG_LEN(m->length), 0);
if (ret < 0)
serror("Failed sendto");
serror("Failed send(to)");
debug(10, "Message sent to node '%s': version=%u, type=%u, endian=%u, length=%u, sequence=%u",
n->name, m->version, m->type, m->endian, m->length, ntohs(m->sequence));