return size;
}
+int btr_splice_out_node(struct btr_node *btrn)
+{
+ struct btr_node *ch;
+
+ if (!btrn)
+ return -ERRNO_TO_PARA_ERROR(EINVAL);
+ if (btr_get_input_queue_size(btrn) != 0)
+ return -ERRNO_TO_PARA_ERROR(EINVAL);
+ PARA_NOTICE_LOG("splicing out %s\n", btrn->name);
+ if (btrn->parent)
+ list_del(&btrn->node);
+ FOR_EACH_CHILD(ch, btrn)
+ ch->parent = btrn->parent;
+ free(btrn->name);
+ free(btrn);
+ return 1;
+}
+
/**
* Return the size of the largest input queue.
*
void btr_consume(struct btr_node *btrn, size_t numbytes);
int btr_exec(struct btr_node *btrn, const char *command, char **value_result);
int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result);
+int btr_splice_out_node(struct btr_node *btrn);