Пример #1
0
/* Destroy a star node. */
void SNetStopStar(node_t *node, fifo_t *fifo)
{
  star_arg_t *sarg = NODE_SPEC(node, star);
  trace(__func__);
  if (!sarg->stopping) {
    sarg->stopping = 1;
    SNetStopStream(sarg->instance, fifo);
  }
  else if (sarg->stopping == 1) {
    sarg->stopping = 2;
    SNetStopStream(sarg->collector, fifo);
    SNetExprListDestroy(sarg->guards);
    SNetVariantListDestroy(sarg->exit_patterns);
    SNetEntityDestroy(sarg->entity);
    SNetDelete(node);
  }
}
Пример #2
0
/* Destroy a dripback node. */
void SNetStopDripBack(node_t *node, fifo_t *fifo)
{
  dripback_arg_t *darg = NODE_SPEC(node, dripback);
  trace(__func__);
  if (darg->stopping == 0) {
    darg->stopping = 1;
    SNetStopStream(darg->instance, fifo);
  }
  else if (darg->stopping == 1) {
    darg->stopping = 2;
    SNetStopStream(darg->output, fifo);
    SNetVariantListDestroy(darg->back_patterns);
    SNetExprListDestroy(darg->guards);
    SNetStreamDestroy(darg->selfref);
    SNetEntityDestroy(darg->entity);
    SNetDelete(node);
  }
}
Пример #3
0
/* Deallocate input node */
void SNetStopInput(node_t *node, fifo_t *fifo)
{
  input_arg_t   *iarg = NODE_SPEC(node, input);

  trace(__func__);
  iarg->indesc->landing->refs = 0;
  SNetFreeLanding(iarg->indesc->landing);
  SNetDelete(iarg->indesc);
  SNetStopStream(iarg->output, fifo);
  SNetDelete(node);
}