* Handler for incoming data values. We just record each leaf name and * value. The values are emittd when the instance is closed. */
| 720 | * value. The values are emittd when the instance is closed. |
| 721 | */ |
| 722 | static int |
| 723 | csv_data (xo_handle_t *xop UNUSED, csv_private_t *csv UNUSED, |
| 724 | const char *name, const char *value, |
| 725 | xo_xof_flags_t flags) |
| 726 | { |
| 727 | csv_dbg(xop, csv, "data: [%s]=[%s] %llx\n", name, value, (unsigned long long) flags); |
| 728 | |
| 729 | if (!(csv->c_flags & CF_RECORD_DATA)) |
| 730 | return 0; |
| 731 | |
| 732 | /* Find the leaf number */ |
| 733 | int fnum = csv_leaf_num(xop, csv, name, flags); |
| 734 | if (fnum < 0) |
| 735 | return 0; /* Don't bother recording */ |
| 736 | |
| 737 | leaf_t *lp = &csv->c_leaf[fnum]; |
| 738 | csv_leaf_set(xop, csv, lp, value); |
| 739 | |
| 740 | return 0; |
| 741 | } |
| 742 | |
| 743 | /* |
| 744 | * The callback from libxo, passing us operations/events as they |
no test coverage detected