diff options
author | Jan Maria Matejka <mq@ucw.cz> | 2018-12-06 09:55:34 +0100 |
---|---|---|
committer | Jan Maria Matejka <mq@ucw.cz> | 2018-12-06 09:55:34 +0100 |
commit | 9a5ef043c11ad9fba00557dedcc0d7ae0d2794e9 (patch) | |
tree | 09697ffd0d9707b7799309369460d369698ad0fc /nest/rt-attr.c | |
parent | 0e4920632aa30dab4fbfb0530bce5a959e7a7675 (diff) | |
parent | 265419a3695b9a5c0a01d9fffc60f66fea8bee13 (diff) |
Merge branch 'mq-custom' into int-new
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r-- | nest/rt-attr.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 7a91a4f6..eeeaaa4c 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -884,7 +884,18 @@ ea_show(struct cli *c, eattr *e) byte buf[CLI_MSG_SIZE]; byte *pos = buf, *end = buf + sizeof(buf); - if (p = class_to_protocol[EA_PROTO(e->id)]) + if (EA_IS_CUSTOM(e->id)) + { + const char *name = ea_custom_name(e->id); + if (name) + { + pos += bsprintf(pos, "%s", name); + status = GA_NAME; + } + else + pos += bsprintf(pos, "%02x.", EA_PROTO(e->id)); + } + else if (p = class_to_protocol[EA_PROTO(e->id)]) { pos += bsprintf(pos, "%s.", p->name); if (p->get_attr) |