| 92 | } |
| 93 | |
| 94 | static const pn_fields_t *pni_node_fields(pn_data_t *data, pni_node_t *node) |
| 95 | { |
| 96 | if (!node) return NULL; |
| 97 | if (node->atom.type != PN_DESCRIBED) return NULL; |
| 98 | |
| 99 | pni_node_t *descriptor = pn_data_node(data, node->down); |
| 100 | |
| 101 | if (!descriptor || descriptor->atom.type != PN_ULONG) { |
| 102 | return NULL; |
| 103 | } |
| 104 | |
| 105 | if (descriptor->atom.u.as_ulong >= FIELD_MIN && descriptor->atom.u.as_ulong <= FIELD_MAX) { |
| 106 | const pn_fields_t *f = &FIELDS[descriptor->atom.u.as_ulong-FIELD_MIN]; |
| 107 | return (f->name_index!=0) ? f : NULL; |
| 108 | } else { |
| 109 | return NULL; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | void pni_inspect_atom(pn_atom_t *atom, pn_fixed_string_t *str) |
| 114 | { |
no test coverage detected