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

better checks for node type specific functions

This commit is contained in:
Steffen Vogel 2015-12-04 17:34:57 +01:00
parent 064af8f4a7
commit 0491015db9
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ struct list node_types = LIST_INIT(NULL);
int node_parse(struct node *n, config_setting_t *cfg)
{
return n->_vt->parse ? n->_vt->parse(n, cfg) : -1;
return n->_vt->parse ? n->_vt->parse(n, cfg) : 0;
}
int node_read(struct node *n, struct msg *p, int ps, int f, int c)
@ -106,7 +106,7 @@ const char * node_name(struct node *n)
const char * node_name_long(struct node *n)
{
if (!n->_name_long)
n->_name_long = n->_vt->print(n);
n->_name_long = n->_vt->print ? n->_vt->print(n) : "";
return n->_name_long;
}

View file

@ -120,7 +120,7 @@ void * recv_loop(void *ctx)
int main(int argc, char *argv[])
{
/* Parse command line arguments */
if (argc < 2)
if (argc < 3)
usage(argv[0]);
char c;