Пример #1
0
void SNetRecFlowInherit( snet_variant_t *pat, snet_record_t *in_rec,
                             snet_record_t *out_rec)
{
  int name, val;
  snet_ref_t *field;

  RECORD_FOR_EACH_FIELD(in_rec, name, field) {
    if (!SNetVariantHasField( pat, name)) {
      SNetRecSetField( out_rec, name, SNetRefCopy(field));
    }
  }

  RECORD_FOR_EACH_TAG(in_rec, name, val) {
    if (!SNetVariantHasTag( pat, name)) {
      SNetRecSetTag( out_rec, name, val);
    }
  }
}
Пример #2
0
 VARIANT_FOR_EACH_TAG(variant, name) {
   SNetRecSetTag( out_rec, name, tags[i]);
   i++;
 }