Commit f1e90f9d authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Don't set value pointer to zero when adding a block.

(This might cause order dependent bugs...)

Fix vesp controller block.
parent 465d5003
......@@ -170,7 +170,6 @@ int controller_block_add(struct controller_block *newblock)
log_send(LOG_T_DEBUG,
"\t\t%d\t%s (%s)", i, newblock->input[i].name,
type);
*newblock->input[i].value.v = NULL;
newblock->input[i].otherside = NULL;
newblock->input[i].block = newblock;
}
......@@ -591,6 +590,10 @@ int controller_block_interm_list_init(struct controller_block *block,
block->input[i].value.v = (void **)(
(char *)block->private + list[i].priv_offset);
block->input[i].ghostof = NULL;
*block->input[i].value.v = NULL;
block->input[i].otherside = NULL;
block->input[i].block = block;
}
return 0;
......
......@@ -194,6 +194,7 @@ static struct controller_block * block_vesp_controller_create(char *name,
if (!(controller_tx = controller_block_alloc("vesp_controller_tx", name_tx, 0)))
goto err_controller;
free(name_tx);
controller_tx->private = controller->private;
controller->calculate = calculate_controller_rx;
controller_tx->calculate = calculate_controller_tx;
......
Markdown is supported
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